zloter/przelewy24-php
Composer 安装命令:
composer require zloter/przelewy24-php
包简介
Przelewy24 PHP library
README 文档
README
PHP wrapper for www.przelewy24.pl.
Usage
Creating an instance
use Przelewy24\Przelewy24; $przelewy24 = new Przelewy24([ 'merchant_id' => '12345', 'crc' => 'aef0...', 'mode' => 'sandbox', // live for production ]);
Creating a transaction
$transaction = $przelewy24->transaction([ 'session_id' => 'unique order identifier from your application', 'url_return' => 'url to return to post transaction', 'url_status' => 'url to which the transaction status webhook will be sent', 'amount' => 'transaction amount as an integer (1.25 PLN = 125)', 'description' => 'transaction description', 'email' => 'buyer email address', ]);
Retrieve the transaction's token:
$transaction->token();
Retrieve the redirect URL to the payment gateway:
$transaction->redirectUrl();
Listening for transaction status webhook
$webhook = $przelewy24->handleWebhook();
Verifying a transaction
$przelewy24->verify([ 'session_id' => 'unique order identifier from your application', 'order_id' => $webhook->orderId(), // przelewy24 order id 'amount' => 'transaction amount as an integer (1.25 PLN = 125)', ]);
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-09-02