tonykssa/tpp-sdk
Composer 安装命令:
composer require tonykssa/tpp-sdk
包简介
TropiPay PHP SDK
关键字:
README 文档
README
TropiPay SDK for PHP.
Install
- composer init
- composer require tonykssa/tpp-sdk
Example
- Create demo.php file:
// loading library require_once __DIR__.'/vendor/autoload.php'; use TppSdk\TropiPay as TropiPay; // define credentials $clientId = "5aca1638f7596bee9cb388e51d2ad58e"; $clientSecret = "4a0150d3cec2036b9f24ec53f52e7c19"; // define the environment to use (production, development, test, etc.) $enviroment = "develop"; // instantiate the library $srv = new TropiPay($clientId, $clientSecret, $enviroment); // define the data of the payment link to create $payload = array( "reference"=> "my-paylink-1", "concept"=> "Bicycle", "favorite"=> "true", "amount"=> 3000, "currency"=>"EUR", "description" => "Two wheels", "singleUse"=>"true", "reasonId"=>4, "expirationDays"=>1, "lang"=>"es", "urlSuccess"=>"https://webhook.site/680826a5-199e-4455-babc-f47b7f26ee7e", "urlFailed"=>"https://webhook.site/680826a5-199e-4455-babc-f47b7f26ee7e", "urlNotification"=>"https://webhook.site/680826a5-199e-4455-babc-f47b7f26ee7e", "serviceDate"=>"2021-08-20", "client"=> array( "name"=>"John", "lastName"=>"McClane", "address"=>"Ave. Guadí 232, Barcelona, Barcelona", "phone"=>"+34645553333", "email"=>"client@email.com", "countryId"=>1, "termsAndConditions"=>"true" ), "directPayment"=>"true" ); // create payment link $paylink = $srv->createPaylink($payload);
- php demo.php
统计信息
- 总下载量: 59
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-01-20