Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ShuCh3n committed Jan 30, 2023
2 parents a2951e7 + 21f5ac4 commit 3c6be03
Show file tree
Hide file tree
Showing 315 changed files with 3,028 additions and 2,750 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.cache

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
$finder = Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/example'
])
->name('*.php')
->notPath('bootstrap/*')
->notPath('storage/*')
->notPath('vendor')
->ignoreDotFiles(true)
->ignoreVCS(true);

return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
],
'braces' => [
'allow_single_line_closure' => false,
'position_after_functions_and_oop_constructs' => 'next',
'position_after_anonymous_constructs' => 'next',
'position_after_control_structures' => 'next',
],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
],
'single_trait_insert_per_statement' => true,
])
->setFinder($finder);
30 changes: 28 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@ All notable changes to this project will be documented in this file.

## [Released]

## [1.3.0]
- Add parameter retrieval in replyhandler, check lower & upper string
- Remove hardcoded iDEAL banks and use api call to retrieve the latest available iDEAL banks
- Add html_entity_decode for the validation checker
- Fixed combined subscription test
- Update Debtor code
- Fix additional parameters
- Add missing cardnumber & pin parameter in giftcard
- Check more condition on json return or push
- Php Clean code format PSR-12
- Add payRemainderEncrypted to creditcard
- Add culture to default payload
- Use TransactionResponse when retrieving the transation status Report by @avido in https://github.com/buckaroo-it/BuckarooSDK_PHP/issues/71
- Update rate_plans node to ratePlans for subscription method

## [1.2.0]
- Add cancelAuthorize method to billink
- Bugfix billink
- Remove Careof in Klarna KP
- Add missing methods in afterpaydigiaccept & partial refund in afterpay
- Add missing parameter and add cancelauthorize
- BP-2088 Consistent naming for VAT in Credit Management
- Added new payment method Buckaroo voucher
- Add ApplePay payRedirect method + example fix
- All examples updated
- Update iDeal banks
- Fix missing FashionChequePin

## [1.1.2]
- Add missing service parameters to Giftcard payment
- BP-2130 Examples updated.
Expand All @@ -19,7 +47,6 @@ All notable changes to this project will be documented in this file.
- BP-2059 Add CancelAuthorize for Creditcards & Missing APIs parameters

## [1.0.1]

- Add missing methods to different payment providers.
- Support lower and/or upper case reply and push response. Report by @antonboutkam https://github.com/buckaroo-it/BuckarooSDK_PHP/issues/36
- Improve reply and push validation. Report by @antonboutkam https://github.com/buckaroo-it/BuckarooSDK_PHP/issues/36
Expand All @@ -29,5 +56,4 @@ All notable changes to this project will be documented in this file.
- Moved vlucas/phpdotenv to dev-dependency. Report by @ederuiter https://github.com/buckaroo-it/BuckarooSDK_PHP/issues/32

## [1.0.0]

- Initial release.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "buckaroo/sdk",
"description": "Buckaroo payment SDK",
"license": "MIT",
"version": "1.2.0",
"version": "1.3.0",
"type": "library",
"require": {
"php": ">=7.4|^8.0",
Expand All @@ -17,7 +17,8 @@
"squizlabs/php_codesniffer": "3.*",
"symfony/var-dumper": "^5.4.9",
"phpunit/phpunit": "^9.5",
"vlucas/phpdotenv": "^5.4"
"vlucas/phpdotenv": "^5.4",
"friendsofphp/php-cs-fixer": "^3.13"
},
"authors": [{
"name": "Buckaroo",
Expand Down
86 changes: 43 additions & 43 deletions example/additional_services/credit_management.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,60 +12,60 @@
// With the returned payload, we can combine it with the next payment.

$invoice = $buckaroo->method('credit_management')->manually()->createCombinedInvoice([
'invoice' => rand(1000, 9999),
'applyStartRecurrent' => 'False',
'invoiceAmount' => 10.00,
'invoiceAmountVAT' => 1.00,
'invoiceDate' => date('Y-m-d'),
'dueDate' => date('Y-m-d'),
'schemeKey' => '2amq34',
'maxStepIndex' => 1,
'allowedServices' => 'ideal,mastercard',
'debtor' => [
'code' => 'johnsmith4'
'invoice' => rand(1000, 9999),
'applyStartRecurrent' => 'False',
'invoiceAmount' => 10.00,
'invoiceAmountVAT' => 1.00,
'invoiceDate' => date('Y-m-d'),
'dueDate' => date('Y-m-d'),
'schemeKey' => '2amq34',
'maxStepIndex' => 1,
'allowedServices' => 'ideal,mastercard',
'debtor' => [
'code' => 'johnsmith4',
],
'email' => '[email protected]',
'phone' => [
'mobile' => '06198765432'
'email' => '[email protected]',
'phone' => [
'mobile' => '06198765432',
],
'person' => [
'culture' => 'nl-NL',
'title' => 'Msc',
'initials' => 'JS',
'person' => [
'culture' => 'nl-NL',
'title' => 'Msc',
'initials' => 'JS',
'firstName' => 'Test',
'lastNamePrefix' => 'Jones',
'lastName' => 'Aflever',
'gender' => Gender::MALE
'gender' => Gender::MALE,
],
'company' => [
'culture' => 'nl-NL',
'name' => 'My Company Corporation',
'company' => [
'culture' => 'nl-NL',
'name' => 'My Company Corporation',
'vatApplicable' => true,
'vatNumber' => 'NL140619562B01',
'chamberOfCommerce' => '20091741'
'vatNumber' => 'NL140619562B01',
'chamberOfCommerce' => '20091741',
],
'address' => [
'street' => 'Hoofdtraat',
'houseNumber' => '90',
'address' => [
'street' => 'Hoofdtraat',
'houseNumber' => '90',
'houseNumberSuffix' => 'A',
'zipcode' => '8441ER',
'city' => 'Heerenveen',
'state' => 'Friesland',
'country' => 'NL'
]
'zipcode' => '8441ER',
'city' => 'Heerenveen',
'state' => 'Friesland',
'country' => 'NL',
],
]);

// In this case, we have the payload stored in the $invoice variable. We can now combine it with the next payment using the combine method

$response = $buckaroo->method('sepadirectdebit')->combine($invoice)->pay([
'invoice' => uniqid(),
'amountDebit' => 10.10,
'iban' => 'NL13TEST0123456789',
'bic' => 'TESTNL2A',
'collectdate' => date('Y-m-d'),
'mandateReference' => '1DCtestreference',
'mandateDate' => '2022-07-03',
'customer' => [
'name' => 'John Smith'
]
]);
'invoice' => uniqid(),
'amountDebit' => 10.10,
'iban' => 'NL13TEST0123456789',
'bic' => 'TESTNL2A',
'collectdate' => date('Y-m-d'),
'mandateReference' => '1DCtestreference',
'mandateDate' => '2022-07-03',
'customer' => [
'name' => 'John Smith',
],
]);
8 changes: 4 additions & 4 deletions example/additional_services/idin.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

//Identify
$response = $buckaroo->method('idin')->identify([
'issuer' => 'BANKNL2Y'
'issuer' => 'BANKNL2Y',
]);

//Verify
$response = $buckaroo->method('idin')->verify([
'issuer' => 'BANKNL2Y'
'issuer' => 'BANKNL2Y',
]);

//Login
$response = $buckaroo->method('idin')->login([
'issuer' => 'BANKNL2Y'
]);
'issuer' => 'BANKNL2Y',
]);
30 changes: 15 additions & 15 deletions example/additional_services/marketplaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@

$marketplace = $buckaroo->method('marketplaces')->manually()->split([
'daysUntilTransfer' => 2,
'marketplace' => [
'amount' => 10,
'description' => 'INV0001 Commission Marketplace'
'marketplace' => [
'amount' => 10,
'description' => 'INV0001 Commission Marketplace',
],
'sellers' => [
'sellers' => [
[
'accountId' => '789C60F316D24B088ACD471',
'amount' => 50,
'description' => 'INV001 Payout Make-Up Products BV'
'accountId' => '789C60F316D24B088ACD471',
'amount' => 50,
'description' => 'INV001 Payout Make-Up Products BV',
],
[
'accountId' => '369C60F316D24B088ACD238',
'amount' => 35,
'description' => 'INV0001 Payout Beauty Products BV'
]
]
'accountId' => '369C60F316D24B088ACD238',
'amount' => 35,
'description' => 'INV0001 Payout Beauty Products BV',
],
],
]);

$response = $buckaroo->method('ideal')->combine($marketplace)->pay([
'invoice' => uniqid(),
'invoice' => uniqid(),
'amountDebit' => 95.00,
'issuer' => 'ABNANL2A'
]);
'issuer' => 'ABNANL2A',
]);
24 changes: 12 additions & 12 deletions example/additional_services/pay_per_email.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
$buckaroo = new BuckarooClient($_ENV['BPE_WEBSITE_KEY'], $_ENV['BPE_SECRET_KEY']);

$response = $buckaroo->method('payperemail')->paymentInvitation([
'amountDebit' => 10,
'invoice' => 'testinvoice 123',
'merchantSendsEmail' => false,
'email' => '[email protected]',
'expirationDate' => carbon()->addDays()->format('Y-m-d'),
'amountDebit' => 10,
'invoice' => 'testinvoice 123',
'merchantSendsEmail' => false,
'email' => '[email protected]',
'expirationDate' => carbon()->addDays()->format('Y-m-d'),
'paymentMethodsAllowed' => 'ideal,mastercard,paypal',
'attachment' => '',
'customer' => [
'gender' => Gender::FEMALE,
'firstName' => 'John',
'lastName' => 'Smith'
]
]);
'attachment' => '',
'customer' => [
'gender' => Gender::FEMALE,
'firstName' => 'John',
'lastName' => 'Smith',
],
]);
Loading

0 comments on commit 3c6be03

Please sign in to comment.