tychinav / platon
Platon 集成
v1.0.3
2020-01-29 12:11 UTC
Requires
- php: >=5.6.0
This package is auto-updated.
Last update: 2024-09-29 05:55:29 UTC
README
使用 composer
composer require tychinav/platon
用法
可能参数列表
['payment' => 'CC',
'order' => 'ORDER-123', // 可选
'amount' => 1.05,
'currency' => 'UAH',
'description' => '购买描述',
'url' => '',
'error_url' => '', // 可选
'recurring' => true, // 可选
'ext1' => 'something', // 可选
....
'ext10' => 'something', // 可选
'lang' => 'en', // 可选
'formid' => 'UIYY2H2', // 可选
'first_name' => 'John', // 可选
'last_name' => 'Doe', // 可选
'address' => 'Some location', // 可选
'zip' => '132456', // 可选
'city' => 'Big city', // 可选
'country' => 'UA', // 可选
'phone' => '0669998877', // 可选
'email' => 'example@mail.com', // 可选
]
您可以在 HTML 表单中添加自己的参数。
示例
<?php
require_once 'vendor/autoload.php';
use Platon\Platon;
$pay = new Platon('TEST000001', 'P@$$vv0r|)');
echo $pay->getHtmlForm([
'payment' => 'CC',
'amount' => '1.99',
'currency' => 'UAH',
'description' => 'Test description',
'url' => 'http://exmple.com',
]);