nimbles-nl/online-betaal-platform
Composer 安装命令:
composer require nimbles-nl/online-betaal-platform
包简介
PHP Package for onlinebetaalplatform
README 文档
README
This project is not maintained anymore
Download the package using composer
Install package by running the command:
$ composer require nimbles-nl/online-betaal-platform
Initializing OnlineBetaalPlatform
$guzzle = new Client(); $apiToken = 'secret-token'; $apiUrl = 'https://api-sandbox.onlinebetaalplatform.nl/v1'; $onlineBetaalPlatform = new OnlineBetaalPlatform($guzzle, $apiToken, $apiUrl);
Send a payment request
$amount = 10050; // in cents 100 = 1 euro. $payment = new Payment('https://www.mywebsite.nl/return-url', $amount); $product = new Product('Apple pie', 950, 1); $payment->addProduct($product); $payment = $onlineBetaalPlatform->createTransaction($payment); $payment->getUid(); // remember this uuid.. return new RedirectResponse($payment->getRedirectUrl());
Receive a payment request
$uuid = 'uuid-received-from-create-method-above'; $payment = $onlineBetaalPlatform->getTransaction($uuid); if ($payment->isSuccess()) { // Your payment is successful } else { // Oops try again.. }
Receive Payments
$payments = $onlineBetaalPlatform->getTransactions();
Initializing Merchants Manager
$guzzle = new Client(); $apiToken = 'secret-token'; $apiUrl = 'https://api-sandbox.onlinebetaalplatform.nl/v1'; $merchantManager = new MerchantsManager($guzzle, $apiToken, $apiUrl);
Create Merchant
$merchant = $merchantManager->createMerchant('Klaas', 'Bruinsma', 'klaas@bruinsma.nl', '0031612345678');
统计信息
- 总下载量: 1.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-04