1. Go to this page and download the library: Download duronrulez/ginger-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use \GingerPayments\Payment\Ginger;
$client = Ginger::createClient('your-api-key');
$order = $client->createOrder(
2500, // The amount in cents
'EUR', // The currency
'ideal', // The payment method
['issuer_id' => 'INGBNL2A'], // Extra details expiration period in ISO 8601 format (optional)
);
$order = $client->createIdealOrder(
2500, // The amount in cents
'EUR', // The currency
'INGBNL2A', // The iDEAL issuer
'A great order', // A description (optional)
'order-234192', // Your identifier for the order (optional)
'http://www.example.com', // The return URL (optional)
'PT15M' // The expiration period in ISO 8601 format (optional)
);
$order = $client->createCreditCardOrder(
2500, // The amount in cents
'EUR', // The currency
'A great order', // A description (optional)
'order-234192', // Your identifier for the order (optional)
'http://www.example.com', // The return URL (optional)
'PT15M' // The expiration period in ISO 8601 format (optional)
);
foreach ($order->transactions() as $transaction) {
$transaction->status()->isCompleted(); // Check the status
$transaction->amount(); // How much paid
}
$issuers = $client->getIdealIssuers();
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.