codifyllc/solid-trust-pay-php
Composer 安装命令:
composer require codifyllc/solid-trust-pay-php
包简介
A starter package for interacting with the Solid Trust Pay API.
README 文档
README
StpButton
This class is used to generate a payment button
$stpButton = new StpButton(); $stpButton->setMerchantAccount('YourMerchantValue'); $stpButton->setItemId('YourMerchantValue'); $stpButton->setSciName('YourMerchantValue'); $stpButton->setLogo('YourMerchantValue'); $stpButton->setUser1('user1 value'); $stpButton->setUser2('user2 value'); $stpButton->setUser3('user3 value'); // setUser* (up to 10) $stpButton->setReturnUrl('http://yourReturnUrl.com/thankyou'); $stpButton->setCancelUrl('http://yourReturnUrl.com/cancel'); $stpButton->setNotifyUrl('http://yourReturnUrl.com/yourCallbackScript.php'); $stpButton->setAmount('25.99'); // Enable Test Mode $stpButton->setTestMode('On');
StpCallback
This class is used to fetch $_POST. This should be called from your notify_url value that you set in your StpButton class
$stpCallback = new StpCallbck(); $status = $stpCallback->getStatus(); $user1 = $stpCallback->getUser1(); $user2 = $stpCallback->getUser2(); switch($status) { case 'COMPLETE': // This is successful! $stpTransId = $stpCallback->getTrId(); break; default: // Something went wrong... break; }
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-09-24