Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phortune/provider/PhortuneStripePaymentProvider.php
Show First 20 Lines • Show All 355 Lines • ▼ Show 20 Lines | switch ($short_code) { | ||||
break; | break; | ||||
case 'error:invalid_amount': | case 'error:invalid_amount': | ||||
case 'error:missing': | case 'error:missing': | ||||
case 'error:card_declined': | case 'error:card_declined': | ||||
case 'error:expired_card': | case 'error:expired_card': | ||||
case 'error:duplicate_transaction': | case 'error:duplicate_transaction': | ||||
case 'error:processing_error': | case 'error:processing_error': | ||||
default: | default: | ||||
// NOTE: These errors currently don't recevive a detailed message. | // NOTE: These errors currently don't receive a detailed message. | ||||
// NOTE: We can also end up here with "http:nnn" messages. | // NOTE: We can also end up here with "http:nnn" messages. | ||||
// TODO: At least some of these should have a better message, or be | // TODO: At least some of these should have a better message, or be | ||||
// translated into common errors above. | // translated into common errors above. | ||||
break; | break; | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
private function loadStripeAPILibraries() { | private function loadStripeAPILibraries() { | ||||
$root = dirname(phutil_get_library_root('phabricator')); | $root = dirname(phutil_get_library_root('phabricator')); | ||||
require_once $root.'/externals/stripe-php/lib/Stripe.php'; | require_once $root.'/externals/stripe-php/lib/Stripe.php'; | ||||
} | } | ||||
} | } |