eventix / omnipay-first-atlantic-commerce
Omnipay PHP支付处理库的第一个大西洋商业V3驱动程序
dev-master
2019-03-05 05:22 UTC
Requires
- ext-json: *
- ext-simplexml: *
- ext-soap: *
- league/iso3166: ~1.0.1
- omnipay/common: ~3
This package is auto-updated.
Last update: 2024-09-05 20:00:24 UTC
README
#omnipay-first-atlantic-commerce V3 仅与hostedPaymentSolution结合使用
$gateway = Omnipay::create('FAC'); $gateway->setMerchantId('xxxxx'); $gateway->setMerchantPassword('xxxxx'); $gateway->setAquirerId('xxxx'); $gateway->setTestMode(true); $orderId = '5d096925-9795-47d0-aade-9d8ed584eb9f'; if(isset($_GET['ID'])){ $options = array( 'orderNumber' => $orderId, ); $response = $gateway->fetchTransaction($options)->send(); $error = $response->getMessage(); $isPaid = $response->isPaid(); } $options = array( 'orderNumber' => $orderId, 'amount' => '10.00', 'currency' => 'USD', 'returnUrl' => 'http://someurl.com/', 'pageSet' => 'PageSet', 'pageName' => 'PageName', 'transactionCode' => '213' ); $response = $gateway->purchase($options)->send(); $singeUseToken = $transactionId = $response->getTransactionReference(); header('Location: '. $response->getRedirectUrl()); exit;