nimbles-nl / online-betaal-platform
PHP Package for onlinebetaalplatform
Installs: 1 371
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=5.5.9
- guzzlehttp/guzzle: ~6.3
Requires (Dev)
- phpunit/phpunit: ^6.1
This package is not auto-updated.
Last update: 2024-11-10 04:37:56 UTC
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');