phuongdev89 / omnipay-byteseller
Byteseller 的 Omnipay 扩展
dev-master
2023-01-10 15:55 UTC
Requires
- ext-curl: *
- ext-json: *
- omnipay/common: ^3.0
This package is not auto-updated.
Last update: 2024-09-22 19:08:00 UTC
README
Byteseller 的 Omnipay 扩展
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一
php composer.phar require --prefer-dist phuongdev89/omnipay-byteseller "*"
或添加
"phuongdev89/omnipay-byteseller": "*"
到您的 composer.json
文件的 require 部分。
用法
本包提供了以下网关
- Byteseller
有关一般用法说明,请参阅主 Omnipay 仓库。
示例
创建支付 URL
use Omnipay\Common\CreditCard; use Omnipay\Byteseller\Gateway; use Omnipay\Omnipay; $command = Omnipay::create(Gateway::NAME); $command->initialize([ 'api_password' => '8kvmsfM92x', 'subseller_id' => '118567', ]); $card = new CreditCard([ 'firstName' => 'Alexa', 'lastName' => 'Smith', 'number' => '4200000000000000', 'cvv' => '000', 'expiryMonth' => '09', 'expiryYear' => '23', 'state' => 'Hanoi', 'postcode' => '100000', 'address1' => 'No 1208 CT 4-5 Yen Hoa', 'city' => 'Cau Giay', 'country' => 'VN', //ansi country code ]); $response = $command->purchase([ 'card' => $card, 'currency' => 'USD', 'email' => 'test@gmail.com', 'language' => 'en', 'merOrderNo' => 1,//unique id of order 'amount' => 10, 'productInfo' => 'Test 10 do', 'requestUrl' => 'http://google.com', 'ip' => '0.0.0.0', //Your client real ip address ])->send(); echo '<pre>'; print_r($response->getData()); die;