Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Code Style

on:
pull_request:
branches:
- master
- develop
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Tests

on:
pull_request:
branches:
- master
- develop
jobs:
tests:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions example/additional_services/voucher.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

$buckaroo = new BuckarooClient($_ENV['BPE_WEBSITE_KEY'], $_ENV['BPE_SECRET_KEY']);


//Create voucher
$response = $buckaroo->method('buckaroovoucher')->create(
[
Expand All @@ -26,7 +25,6 @@
]
);


//Pay
$response = $buckaroo->method('buckaroovoucher')->payRemainder(
[
Expand All @@ -37,7 +35,6 @@
]
);


//Refund
$response = $buckaroo->method('buckaroovoucher')->refund(
[
Expand Down
1 change: 0 additions & 1 deletion example/responses/push.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
$reply_handler->isValid(); // Return either true or false
//END HTTP POST PUSH


//START JSON PUSH
$auth_header = 'IBjihN7Fhp:0YvyjYAzDQ28W+hQi80f2nhe0Z1QFJLbz7IH//6LsAU=:cad1832100784f57a6e6de835d9f3638:1658227572';
$post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c","ServiceCode":"ideal",
Expand Down
1 change: 0 additions & 1 deletion example/transactions/applepay_redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
'continueOnIncomplete' => '1',
]);


//Refund
$response = $buckaroo->method('applepay')->refund([
'amountCredit' => 10,
Expand Down
1 change: 0 additions & 1 deletion example/transactions/bancontact.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
'originalTransactionKey' => '91D08EC01F414926A4CA29C059XXXXXX',
]);


//Refund
$response = $buckaroo->method('bancontactmrcash')->refund([
'invoice' => '', //Set invoice number of the transaction to refund
Expand Down
1 change: 0 additions & 1 deletion example/transactions/billink.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
],
]);


//Refund
$response = $buckaroo->method('billink')->refund([
'amountCredit' => 10,
Expand Down
2 changes: 1 addition & 1 deletion example/transactions/bizum.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
'amountCredit' => 10,
'invoice' => 'testinvoice 123',
'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX',
]);
]);
12 changes: 6 additions & 6 deletions example/transactions/blik.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
//Also accepts json
//Pay
$response = $buckaroo->method('blik')->pay([
'currency' => 'PLN',
'amountDebit' => 10.00,
'invoice' => 'Blik Test Plugins Example',
'description' => 'Blik Test Plugins Example',
'email' => 'test@buckar00.nl'
]);
'currency' => 'PLN',
'amountDebit' => 10.00,
'invoice' => 'Blik Test Plugins Example',
'description' => 'Blik Test Plugins Example',
'email' => 'test@buckar00.nl',
]);
2 changes: 1 addition & 1 deletion example/transactions/clicktopay.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'description' => "test ClickToPay",
"clientIP" => [
"type" => 0,
"address" => "0.0.0.0"
"address" => "0.0.0.0",
],
'continueOnIncomplete' => "1",
]);
4 changes: 2 additions & 2 deletions example/transactions/externalPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
$response = $buckaroo->method('externalPayment')->pay([
'invoice' => uniqid(),
'amountDebit' => 10.10,
'channel' => 'BackOffice'
'channel' => 'BackOffice',
]);

$buckaroo->method('externalPayment')->refund([
'amountCredit' => 10,
'invoice' => 'testinvoice 123',
'originalTransactionKey' => $response->getTransactionKey(),
]);
]);
1 change: 0 additions & 1 deletion example/transactions/giftcards_redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
'continueOnIncomplete' => '1',
]);


//Refund
$response = $buckaroo->method('giftcard')->refund([
'amountCredit' => 10,
Expand Down
40 changes: 20 additions & 20 deletions example/transactions/in3-abn-amro-achteraf-betalen.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
$buckaroo = new BuckarooClient($_ENV['BPE_WEBSITE_KEY'], $_ENV['BPE_SECRET_KEY']);

$payload = [
'amountDebit' => 52.30,
'description' => 'ABN AMRO Achteraf Betalen payment via In3',
'order' => uniqid(),
'invoice' => uniqid(),
'clientIP' => '127.0.0.1',
'route' => 'abn_b2b', // This parameter routes the In3 payment to ABN AMRO Achteraf Betalen
'billing' => [
'recipient' => [
'category' => 'B2C',
'initials' => 'J',
'firstName' => 'John',
'lastName' => 'Dona',
'birthDate' => '1990-01-01',
'amountDebit' => 52.30,
'description' => 'ABN AMRO Achteraf Betalen payment via In3',
'order' => uniqid(),
'invoice' => uniqid(),
'clientIP' => '127.0.0.1',
'route' => 'abn_b2b', // This parameter routes the In3 payment to ABN AMRO Achteraf Betalen
'billing' => [
'recipient' => [
'category' => 'B2C',
'initials' => 'J',
'firstName' => 'John',
'lastName' => 'Dona',
'birthDate' => '1990-01-01',
'customerNumber' => '12345',
'phone' => '0612345678',
'country' => 'NL',
'companyName' => 'My Company B.V.',
'chamberOfCommerce' => '123456'
'phone' => '0612345678',
'country' => 'NL',
'companyName' => 'My Company B.V.',
'chamberOfCommerce' => '123456',
],
'address' => [
'street' => 'Hoofdstraat',
Expand All @@ -45,7 +45,7 @@
'careOf' => 'John Smith',
'firstName' => 'John',
'lastName' => 'Do',
'chamberOfCommerce' => '123456'
'chamberOfCommerce' => '123456',
],
'address' => [
'street' => 'Kalverstraat',
Expand Down Expand Up @@ -84,7 +84,7 @@
'quantity' => '1',
'price' => '2',
],
]
],
];

//Also accepts json
Expand All @@ -96,4 +96,4 @@
'amountCredit' => 10,
'invoice' => '10000480',
'originalTransactionKey' => '9AA4C81A08A84FA7B68E6A6A6291XXXX',
]);
]);
36 changes: 18 additions & 18 deletions example/transactions/in3.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
$buckaroo = new BuckarooClient($_ENV['BPE_WEBSITE_KEY'], $_ENV['BPE_SECRET_KEY']);

$payload = [
'amountDebit' => 52.30,
'description' => 'in3 pay',
'order' => uniqid(),
'invoice' => uniqid(),
'clientIP' => '127.0.0.1',
'billing' => [
'recipient' => [
'category' => 'B2C',
'initials' => 'J',
'firstName' => 'John',
'lastName' => 'Dona',
'birthDate' => '1990-01-01',
'customerNumber' => '12345',
'phone' => '0612345678',
'country' => 'NL',
'amountDebit' => 52.30,
'description' => 'in3 pay',
'order' => uniqid(),
'invoice' => uniqid(),
'clientIP' => '127.0.0.1',
'billing' => [
'recipient' => [
'category' => 'B2C',
'initials' => 'J',
'firstName' => 'John',
'lastName' => 'Dona',
'birthDate' => '1990-01-01',
'customerNumber' => '12345',
'phone' => '0612345678',
'country' => 'NL',
'companyName' => 'My Company B.V.',
'chamberOfCommerce' => '123456'
'chamberOfCommerce' => '123456',
],
'address' => [
'street' => 'Hoofdstraat',
Expand All @@ -44,7 +44,7 @@
'careOf' => 'John Smith',
'firstName' => 'John',
'lastName' => 'Do',
'chamberOfCommerce' => '123456'
'chamberOfCommerce' => '123456',
],
'address' => [
'street' => 'Kalverstraat',
Expand Down Expand Up @@ -83,7 +83,7 @@
'quantity' => '1',
'price' => '2',
],
]
],
];

//Also accepts json
Expand Down
1 change: 0 additions & 1 deletion example/transactions/kbc.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
'amountDebit' => 10.10,
]);


//Refund
$response = $buckaroo->method('kbcpaymentbutton')->refund([
'invoice' => '', //Set invoice number of the transaction to refund
Expand Down
1 change: 0 additions & 1 deletion example/transactions/noservicespecified.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
'continueOnIncomplete' => '1',
]);


//Refund
$response = $buckaroo->method(null)->refund([
'invoice' => '', //Set invoice number of the transaction to refund
Expand Down
2 changes: 1 addition & 1 deletion example/transactions/payment_initiation.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
'invoice' => '', //Set invoice number of the transaction to refund
'originalTransactionKey' => '', //Set transaction key of the transaction to refund
'amountCredit' => 10,
]);
]);
2 changes: 1 addition & 1 deletion example/transactions/swish.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
'amountCredit' => 10,
'invoice' => 'testinvoice 123',
'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX',
]);
]);
1 change: 0 additions & 1 deletion example/transactions/thunes.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
require_once '../bootstrap.php';

use Buckaroo\BuckarooClient;
use Buckaroo\Resources\Constants\RecipientCategory;

$buckaroo = new BuckarooClient($_ENV['BPE_WEBSITE_KEY'], $_ENV['BPE_SECRET_KEY']);

Expand Down
2 changes: 1 addition & 1 deletion example/transactions/twint.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
'amountCredit' => 10,
'invoice' => 'testinvoice 123',
'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX',
]);
]);
2 changes: 1 addition & 1 deletion example/transactions/wero.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
'amountCredit' => 10,
'invoice' => 'testinvoice 123',
'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX',
]);
]);
10 changes: 3 additions & 7 deletions src/BuckarooClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,11 @@ class BuckarooClient
*/
public function __construct($websiteKey, ?string $secretKey = null, ?string $mode = null)
{
if ($websiteKey instanceof Config)
{
if ($websiteKey instanceof Config) {
$this->config = $websiteKey;
}

if (is_string($websiteKey))
{
if (is_string($websiteKey)) {
$this->config = $this->getConfig($websiteKey, $secretKey, $mode);
}

Expand All @@ -75,7 +73,6 @@ public function method(?string $method = null): PaymentFacade
return new PaymentFacade($this->client, $method);
}


public function getActiveSubscriptions(): array
{
return (new ActiveSubscriptions($this->client))->get();
Expand Down Expand Up @@ -148,8 +145,7 @@ public function client()
*/
private function getConfig(string $websiteKey, string $secretKey, ?string $mode = null): ?Config
{
if ($websiteKey && $secretKey)
{
if ($websiteKey && $secretKey) {
return new DefaultConfig($websiteKey, $secretKey, $mode);
}

Expand Down
Loading