teraxis/concord-sdk-php
Composer 安装命令:
composer require teraxis/concord-sdk-php
包简介
SDK for ConcordPay
关键字:
README 文档
README
Connect ConcordPaySDK.php to your project
require_once('ConcordPaySDK.php');
Create constants env.php file with constants:
const PRIVATE_KEY = '';
const MERCHANT_ID = '';
The sample file (env.example.php) is in the root of the project.
Create Object SDK in your php code
$sdk = new ConcordPaySDK(PRIVATE_KEY);
Create array with necessary params
The list of params you can see in the ConcordPay SDK documentation.
For Example:
$params = [
'operation' => 'Purchase',
'merchant_id' => MERCHANT_ID,
'amount' => 0.1,
'order_id' => '60#20210810',
'currency_iso' => 'UAH',
'description' => 'test',
'add_params' => [],
'approve_url' => 'http://sdk.loc/reciver.php',
'decline_url' => 'http://sdk.loc/decline',
'callback_url' => 'http://sdk.loc/reciver.php',
'cancel_url' => 'http://sdk.loc/cancel'
];
In case you need to specify button "Send" you can use ID of the form : sdk-concord.
Call method with params
For Example:
echo $sdk->purchase($params);
Available methods are the same as in ConcordPay Documentation
| Method | Operation |
|---|---|
| params | Return array of parameters |
| purchase | Payment on the payment processing page |
| recPayment | Recurrent payments RecPayment (payment by token) |
| verify | Verify Operation |
| reversal | Operation Reversal |
| complete | Operation Complete |
| check | Operation Check |
| p2pCredit | Operation P2PCredit |
| getBalance | Get Balance Operation (GetBalance) |
| p2pDebit | Operation P2PDebit |
| purchaseOnMerchant | Operation PurchaseOnMerchant |
| getMasterpassToken | Getting a token for Masterpass |
| purchaseMasterpass | Making a payment through Masterpass |
| confirm3DS | The confirmation of 3DS Verification Verification |
$sdk = new ConcordPaySDK(PRIVATE_KEY);
$token = $sdk->getMasterpassToken($params);
...
Other
Each method in ConcordPaySDK can return query or method buildForm methods.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: OSL-3.0
- 更新时间: 2023-05-24