kameli/quickpay-v10
A library to communicate with the Danish payment gateway Quickpay
6,194
6
| Install | |
|---|---|
composer require kameli/quickpay-v10 |
|
| Latest Version: | v6.5.0 |
| PHP: | >=5.5 |
| License: | MIT |
| Last Updated: | Apr 26, 2023 |
| Links: | GitHub · Packagist |
Maintainer: danielboendergaard
Quickpay V10
Features:
- Access the Quickpay API
- Payments
- Subscriptions
- Cards
- Payouts
- Brandings
- Generate payment links
- Validate callbacks
- Generate payment forms
Go to the official QuickPay documentation to explore all endpoints and options: http://tech.quickpay.net/api/services/?scope=merchant
Installation
composer require kameli/quickpay-v10
Examples
Process a payment
<?php
use Kameli\Quickpay\Quickpay;
$qp = new Quickpay('API_KEY', 'PRIVATE_KEY');
$payment = $qp->payments()->create([
'currency' => 'DKK',
'order_id' => 'SOME_UNIQUE_ORDER_ID',
]);
$link = $qp->payments()->link($payment->getId(), [
'amount' => 10000, // amount in least valuable unit (øre)
]);
// Make the user follow the payment link which will take them to a form where they put in their card details
$url = $link->getUrl();
// When the form has been completed, a POST request will be sent to a specified url where you can validate it
if ($qp->validateCallback()) {
$payment = $qp->receivePaymentCallback();
// Capture the amount to charge the card
$qp->payments()->captureAmount($payment->getId(), $payment->amount());
// Handle order
}
Create a subscription and make recurring payments
Remember to enable subscriptions for the acquirer you are using.
<?php
use Kameli\Quickpay\Quickpay;
$qp = new Quickpay('API_KEY', 'PRIVATE_KEY');
$subscription = $qp->subscriptions()->create([
'currency' => 'DKK',
'order_id' => 'SOME_UNIQUE_ORDER_ID',
'description' => 'Abonnement',
]);
$link = $qp->subscriptions()->link($subscription->getId(), [
'amount' => 100, // the amount does not matter here, but is still required for some reason
]);
// Make the user follow the payment link which will take them to a form where they put in their card details
$url = $link->getUrl();
// When the form has been completed, a POST request will be sent to a specified url where you can validate it
if ($qp->validateCallback()) {
$subscription = $qp->receiveSubscriptionCallback();
}
// Use the recurring method to make new payments
$payment = $qp->subscriptions()->recurring($subscription->getId(), [
'amount' => 10000,
'order_id' => 'SOME_UNIQUE_ORDER_ID',
]);
// Capture the amount to charge the card
$qp->payments()->captureAmount($payment->getId(), $payment->amount());
Related Packages
mollie/laravel-mollie
Mollie API client wrapper for Laravel & Mollie Connect provider for Laravel Soci...
5,214,985
362
sebdesign/laravel-viva-payments
A Laravel package for integrating the Viva Payments gateway
57,902
49
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| v6.5.0 | >=5.5 | MIT | |
| v6.4.0 | >=5.5 | MIT | |
| v6.3.0 | >=5.5 | MIT | |
| v6.2.0 | >=5.5 | MIT | |
| v6.1.0 | >=5.5 | MIT | |
| v6.0.0 | >=5.5 | MIT | |
| v5.1.1 | >=5.5 | MIT | |
| v5.1.0 | >=5.5 | MIT | |
| v5.0.0 | >=5.5 | MIT | |
| v4.3.0 | >=5.4 | MIT | |
| v4.2.0 | >=5.4 | MIT | |
| v4.1.1 | >=5.4 | MIT | |
| v4.1.0 | >=5.4 | MIT | |
| v4.0.0 | >=5.4 | MIT | |
| v3.2.0 | MIT | ||
| v3.1.0 | MIT | ||
| v3.0.0 | MIT | ||
| v2.3.0 | MIT | ||
| v2.2.0 | MIT | ||
| v2.1.0 | MIT | ||
| v2.0.0 | MIT | ||
| v1.0.0 | MIT | ||
| v0.10.0 | MIT | ||
| v0.9.3 | MIT | ||
| v0.9.2 | MIT | ||
| v0.9.1 | MIT | ||
| v0.9.0 | MIT | ||
| v0.8.0 | MIT | ||
| v0.7.0 | MIT | ||
| v0.6.0 | MIT |
Showing the latest 30 of 40. See every release on Packagist