Skip to content

boldrebel/online-betaal-platform

 
 

Repository files navigation

PHP client for onlinebetaalplatform.nl

Build Status Latest Stable Version License Total Downloads codecov

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');

About

Onlinebetaalplatform PHP Package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%