astropay / cashoutcard
Astropay Cashout-cash集成包
dev-master
2016-08-26 21:04 UTC
Requires
- php: >=5.5.0
- curl/curl: ^1.2
- phpunit/phpunit: 4.8.5
This package is not auto-updated.
Last update: 2024-10-02 09:56:58 UTC
README
在https://developers.astropaycard.com/上阅读完整文档
示例
composer require astropay/cashoutcard dev-master
在public/index.php中复制代码引用
<?php include 'vendor/autoload.php'; $login = 'merchant_x_login'; $trans_key = 'merchant_x_trans_key'; $secret = 'merchant_secret'; $api = new \Astropay\CashoutCard(Astropay\Constants::ENV_SANDBOX); $api->setCredentials($login, $trans_key, $secret); $api->setAmount(100); $api->setCurrency('USD'); $api->setEmail('test@astropaycard.com'); $api->setName('Test recipient'); $api->setDocument('8976fsdf1234'); if($api->sendCard()){ echo urldecode($api->getMessage()); echo '<br/>'.$api->getAuthCode(); } else { echo urldecode($api->getMessage()); }