From 2a3b3602ad6775a10bab940bd6ae6e0b3f21eae7 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 15 Nov 2023 14:20:33 +0100 Subject: [PATCH] 1.9.0 (#155) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 * BP-2511 Removed Ippies (#117) * BP-2417 Added Thunes * Deleted Ippies * Deleted Thunes changes * BP-2417 Added Thunes (#111) * BP-2417 Added Thunes * BP-2417 Added Thunes * End of line * added the example again * Deleted Article.php * BP-2543 - Add (Bancontact) Deferred Sales (#116) * Added Deferred Sales * Authenticate method refers to authorize * BP-2617 - Allow CustomParameters (#118) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Bugfix/addition parameter (#119) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Retain float in json_encode (#121) * Version change * BP-2507 Add Payment initiation (#110) * BP-2507 Add Payment initiation * BP-2507 Add Payment initiation * phpcs * PSR2 * PSR2 * Phpcs * Add missing shipping cost to refund in afterpay (#124) * Bp 2688 update readme file (#125) * v1.6.0 (#115) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * Push validator fix (#123) * Retain float in json_encode * Version update * Update README.md Update READM.md --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * BP-2461 - Add the correct ModuleVersion and PlatformName (#120) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Ability to fill in software header * Able to pass in a config object into the constructor * PHP CS Fixer * Ignoring spaceafterkeyword * BP-2650 - Culture was not working correctly (#126) * BP-2417 Added Thunes * BP-2650 - Culture was not working correctly * Deleted Thunes/Models/Article.php * Adding culture to config * Phpcs fix --------- Co-authored-by: Shu Chen * Prepare v1.7.0 * Merge conflict resolved * Remove head merge conflict * Comment removal * Comment removal * Add pay by bank example (#128) * BP-2797 Add possibility to change Channel header (#134) * BP-2417 Added Thunes * BP-2797 Add possibility to change Channel header * delete file * Delete Channel from Payload * Features/in3new (#138) * In3 new * In3 new 2 * In3 new final touches * Filename update * In3 new added example --------- Co-authored-by: Shu Chen * Prepare release 1.8.0 * BP-2873 * BP-2912 rename IDin to iDin (#145) * BP-2417 Added Thunes * Idin name change to idin * deleted article Thunes * Changed uppercase * Changed name * excluded iDin in check * BP-3034 Add payment method "MB WAY" (#147) * BP-3034 Add payment method "MB WAY" * fix namespace * fix folder naming * fix tests --------- Co-authored-by: Ivascu Madalin * BP-3020 Add payment method "Multibanco" (#148) * BP-3020 Add payment method "Multibanco" * fix tests --------- Co-authored-by: Ivascu Madalin * Add GitHub action file * Phone number fixes (#144) * Remove unused phone parameters * Remove comma after last element from array * add method to get issuers for PayByBank (#152) + add tests for PayByBank & iDeal + create trait for reusable * BP-3009 Resolve SonarQube bugs and update README.md (#151) * Bugs and code smells * Deleted unused method * 1.9.0 (#154) * Prepare release v1.8.0 (#139) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 * BP-2511 Removed Ippies (#117) * BP-2417 Added Thunes * Deleted Ippies * Deleted Thunes changes * BP-2417 Added Thunes (#111) * BP-2417 Added Thunes * BP-2417 Added Thunes * End of line * added the example again * Deleted Article.php * BP-2543 - Add (Bancontact) Deferred Sales (#116) * Added Deferred Sales * Authenticate method refers to authorize * BP-2617 - Allow CustomParameters (#118) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Bugfix/addition parameter (#119) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Retain float in json_encode (#121) * Version change * BP-2507 Add Payment initiation (#110) * BP-2507 Add Payment initiation * BP-2507 Add Payment initiation * phpcs * PSR2 * PSR2 * Phpcs * Add missing shipping cost to refund in afterpay (#124) * Bp 2688 update readme file (#125) * v1.6.0 (#115) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * Push validator fix (#123) * Retain float in json_encode * Version update * Update README.md Update READM.md --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * BP-2461 - Add the correct ModuleVersion and PlatformName (#120) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Ability to fill in software header * Able to pass in a config object into the constructor * PHP CS Fixer * Ignoring spaceafterkeyword * BP-2650 - Culture was not working correctly (#126) * BP-2417 Added Thunes * BP-2650 - Culture was not working correctly * Deleted Thunes/Models/Article.php * Adding culture to config * Phpcs fix --------- Co-authored-by: Shu Chen * Prepare v1.7.0 * Merge conflict resolved * Remove head merge conflict * Comment removal * Comment removal * Add pay by bank example (#128) * BP-2797 Add possibility to change Channel header (#134) * BP-2417 Added Thunes * BP-2797 Add possibility to change Channel header * delete file * Delete Channel from Payload * Features/in3new (#138) * In3 new * In3 new 2 * In3 new final touches * Filename update * In3 new added example --------- Co-authored-by: Shu Chen * Prepare release 1.8.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> * Prepare v1.8.1 (#149) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * BP-2417 Added Thunes * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 * BP-2511 Removed Ippies (#117) * BP-2417 Added Thunes * Deleted Ippies * Deleted Thunes changes * BP-2417 Added Thunes (#111) * BP-2417 Added Thunes * BP-2417 Added Thunes * End of line * added the example again * Deleted Article.php * BP-2543 - Add (Bancontact) Deferred Sales (#116) * Added Deferred Sales * Authenticate method refers to authorize * BP-2617 - Allow CustomParameters (#118) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Bugfix/addition parameter (#119) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Retain float in json_encode (#121) * Version change * BP-2507 Add Payment initiation (#110) * BP-2507 Add Payment initiation * BP-2507 Add Payment initiation * phpcs * PSR2 * PSR2 * Phpcs * Add missing shipping cost to refund in afterpay (#124) * Bp 2688 update readme file (#125) * v1.6.0 (#115) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * Push validator fix (#123) * Retain float in json_encode * Version update * Update README.md Update READM.md --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * BP-2461 - Add the correct ModuleVersion and PlatformName (#120) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Ability to fill in software header * Able to pass in a config object into the constructor * PHP CS Fixer * Ignoring spaceafterkeyword * BP-2650 - Culture was not working correctly (#126) * BP-2417 Added Thunes * BP-2650 - Culture was not working correctly * Deleted Thunes/Models/Article.php * Adding culture to config * Phpcs fix --------- Co-authored-by: Shu Chen * Prepare v1.7.0 * Merge conflict resolved * Remove head merge conflict * Comment removal * Comment removal * Add pay by bank example (#128) * BP-2797 Add possibility to change Channel header (#134) * BP-2417 Added Thunes * BP-2797 Add possibility to change Channel header * delete file * Delete Channel from Payload * Features/in3new (#138) * In3 new * In3 new 2 * In3 new final touches * Filename update * In3 new added example --------- Co-authored-by: Shu Chen * Prepare release 1.8.0 * BP-2873 * Idin name change to idin * deleted article Thunes * Changed uppercase * Changed name * excluded iDin in check * Prepare 1.8.1 release --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Sander Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> * Checkout update * Version update * Fixing merge conflict * Update workflows * disable sonarcube * Revert checklint * Revert * revert types and checkout version * Remove sonarqube entirely * Workflow * Remove matrix os * Re-add sonarqube * removed error with exception * Adding php 8.3 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> Co-authored-by: Sander * Merge conflict --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> Co-authored-by: Ivascu Madalin Co-authored-by: Ivascu Madalin Co-authored-by: Vildan Bina Co-authored-by: Sander --- .github/workflows/codestyle.yml | 4 +- .github/workflows/sonarqube.yml | 23 ++++++++ README.md | 3 +- composer.json | 2 +- .../additional_services/credit_management.php | 5 +- example/additional_services/idin.php | 2 +- example/additional_services/marketplaces.php | 2 +- example/additional_services/pay_per_email.php | 2 +- example/additional_services/subscriptions.php | 6 +- example/additional_services/surepay.php | 2 +- example/additional_services/voucher.php | 2 +- example/additional_services/wallets.php | 2 +- example/bootstrap.php | 2 + example/responses/push.php | 18 +++++- example/responses/return.php | 5 +- example/transactions/afterpay.php | 6 +- example/transactions/afterpaydigiaccept.php | 2 +- example/transactions/alipay.php | 2 +- example/transactions/applepay.php | 2 +- example/transactions/applepay_redirect.php | 2 +- example/transactions/bancontact.php | 13 ++-- example/transactions/belfius.php | 2 +- example/transactions/billink.php | 5 +- example/transactions/credit_click.php | 2 +- example/transactions/creditcard.php | 20 ++++--- example/transactions/eps.php | 2 +- example/transactions/giftcards.php | 2 +- example/transactions/giftcards_redirect.php | 7 ++- example/transactions/giropay.php | 2 +- example/transactions/ideal.php | 2 +- example/transactions/ideal_qr.php | 2 +- example/transactions/in3.php | 8 +-- example/transactions/in3old.php | 3 +- example/transactions/kbc.php | 2 +- example/transactions/klarna.php | 2 +- example/transactions/klarnakp.php | 2 +- example/transactions/mbway.php | 21 +++++++ example/transactions/multibanco.php | 21 +++++++ example/transactions/noservicespecified.php | 2 +- example/transactions/payconiq.php | 2 +- example/transactions/payment_initiation.php | 3 +- example/transactions/paypal.php | 2 +- example/transactions/pos.php | 2 +- example/transactions/przelewy24.php | 2 +- example/transactions/sepa.php | 2 +- example/transactions/sofort.php | 2 +- example/transactions/thunes.php | 2 +- example/transactions/tinka.php | 2 +- example/transactions/transfer.php | 2 +- example/transactions/trustly.php | 2 +- example/transactions/wechat.php | 2 +- sonar-project.properties | 9 +++ .../Service/ParameterKeys/PhoneAdapter.php | 2 +- .../Service/ParameterKeys/PhoneAdapter.php | 2 +- .../Service/ParameterKeys/PhoneAdapter.php | 3 +- .../Service/ParameterKeys/PhoneAdapter.php | 4 +- .../Service/ParameterKeys/PhoneAdapter.php | 2 +- .../Service/ParameterKeys/PhoneAdapter.php | 3 +- .../Service/ParameterKeys/PhoneAdapter.php | 2 +- src/PaymentMethods/MBWay/MBWay.php | 30 ++++++++++ src/PaymentMethods/Multibanco/Multibanco.php | 30 ++++++++++ .../PaymentInitiation/PaymentInitiation.php | 16 +++++ src/PaymentMethods/PaymentMethodFactory.php | 4 ++ .../Service/ParameterKeys/PhoneAdapter.php | 2 +- .../Service/ParameterKeys/PhoneAdapter.php | 2 +- src/PaymentMethods/iDeal/iDeal.php | 34 +++-------- src/Services/TraitHelpers/HasIssuers.php | 59 +++++++++++++++++++ src/Transaction/Request/Request.php | 26 -------- .../Payments/AfterpayDigiAcceptTest.php | 15 ----- tests/Buckaroo/Payments/AfterpayTest.php | 21 ++----- tests/Buckaroo/Payments/BancontactTest.php | 5 +- tests/Buckaroo/Payments/BatchTest.php | 2 +- tests/Buckaroo/Payments/BillinkTest.php | 6 +- tests/Buckaroo/Payments/CreditcardTest.php | 12 ++-- tests/Buckaroo/Payments/IdealTest.php | 26 +++++--- tests/Buckaroo/Payments/MBWayTest.php | 55 +++++++++++++++++ tests/Buckaroo/Payments/MarketplacesTest.php | 3 +- tests/Buckaroo/Payments/MultibancoTest.php | 55 +++++++++++++++++ .../NoServiceSpecifiedPaymentTest.php | 2 +- tests/Buckaroo/Payments/PaymentInitiation.php | 18 +++++- tests/Buckaroo/Payments/PushTest.php | 46 ++++++--------- 81 files changed, 520 insertions(+), 215 deletions(-) create mode 100644 .github/workflows/sonarqube.yml create mode 100644 example/transactions/mbway.php create mode 100644 example/transactions/multibanco.php create mode 100644 sonar-project.properties create mode 100644 src/PaymentMethods/MBWay/MBWay.php create mode 100644 src/PaymentMethods/Multibanco/Multibanco.php create mode 100644 src/Services/TraitHelpers/HasIssuers.php create mode 100644 tests/Buckaroo/Payments/MBWayTest.php create mode 100644 tests/Buckaroo/Payments/MultibancoTest.php diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 1348548f..d1299723 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -12,13 +12,13 @@ jobs: strategy: fail-fast: true matrix: - php: [7.4, 8.1, 8.2] + php: [7.4, 8.1, 8.2, 8.3] stability: [prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 00000000..8fc4627a --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,23 @@ +name: SonarQube PR Analysis + +on: + push: + branches: + - master + - develop/ + - 'bugfix/**' + pull_request: + types: [opened, synchronize, reopened] + +jobs: + sonarqube: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} \ No newline at end of file diff --git a/README.md b/README.md index 225b0055..4d68cf0b 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,8 @@ You can find your credentials in plaza [WEBSITE_KEY](https://plaza.buckaroo.nl/ require __DIR__ . '/vendor/autoload.php'; # Get your website & secret key in your plaza. -# You can perform a test payment by giving the third param with the string "test", on default it is set on "live" +# You can perform a test payment by giving the third param with the string "test", on default it is set on "test". +# By changing the value of the third parameter to "live", a live transaction can be performed. $buckaroo = new \BuckarooClient('WEBSITE_KEY', 'SECRET_KEY', 'test'); ``` diff --git a/composer.json b/composer.json index dd0a93fb..7e30bcd0 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.8.1", + "version": "1.9.0", "type": "library", "require": { "php": ">=7.4|^8.0", diff --git a/example/additional_services/credit_management.php b/example/additional_services/credit_management.php index e26bd257..a57cc686 100644 --- a/example/additional_services/credit_management.php +++ b/example/additional_services/credit_management.php @@ -1,6 +1,6 @@ method('sepadirectdebit')->combine($invoice)->pay([ 'invoice' => uniqid(), diff --git a/example/additional_services/idin.php b/example/additional_services/idin.php index 8fe3a8b6..027166c4 100644 --- a/example/additional_services/idin.php +++ b/example/additional_services/idin.php @@ -1,6 +1,6 @@ [ - 'mobile' => '0612345678', + 'mobile' => '0612345679', ], 'debtor' => [ 'code' => 'johnsmith4', @@ -113,7 +113,7 @@ 'country' => 'NL', ], 'phone' => [ - 'mobile' => '0612345678', + 'mobile' => '0612345670', ], ]); diff --git a/example/additional_services/surepay.php b/example/additional_services/surepay.php index 33f5017b..a3ff5035 100644 --- a/example/additional_services/surepay.php +++ b/example/additional_services/surepay.php @@ -1,6 +1,6 @@ "J. de Tèster", "brq_invoicenumber" => "SDKDevelopment.com_INVOICE_NO_628c6d032af90", "brq_ordernumber" => "SDKDevelopment.com_ORDER_NO_628c6d032af95", - "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da", + "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a2 + 1651d4734cc568816f9bd59c2092911e6c0da", "brq_payment" => "D44ACDD0F99D4A1C811D2CD3EFDB05BA", "brq_payment_method" => "ideal", "brq_SERVICE_ideal_consumerBIC" => "RABONL2U", @@ -40,7 +41,18 @@ //START JSON PUSH $auth_header = 'IBjihN7Fhp:0YvyjYAzDQ28W+hQi80f2nhe0Z1QFJLbz7IH//6LsAU=:cad1832100784f57a6e6de835d9f3638:1658227572'; -$post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c","ServiceCode":"ideal","Status":{"Code":{"Code":190,"Description":"Success"},"SubCode":{"Code":"S001","Description":"Transaction successfully processed"},"DateTime":"2022-07-19T12:46:12"},"IsTest":true,"Order":"ORDER_NO_62d68b6ca2df3","Currency":"EUR","AmountDebit":10.1,"TransactionType":"C021","Services":[{"Name":"ideal","Action":null,"Parameters":[{"Name":"consumerIssuer","Value":"ABN AMRO"},{"Name":"transactionId","Value":"0000000000000001"},{"Name":"consumerName","Value":"J. de Tèster"},{"Name":"consumerIBAN","Value":"NL44RABO0123456789"},{"Name":"consumerBIC","Value":"RABONL2U"}],"VersionAsProperty":2}],"CustomParameters":null,"AdditionalParameters":{"List":[{"Name":"initiated_by_magento","Value":"1"},{"Name":"service_action","Value":"something"}]},"MutationType":1,"RelatedTransactions":null,"IsCancelable":false,"IssuingCountry":null,"StartRecurrent":false,"Recurring":false,"CustomerName":"J. de Tèster","PayerHash":"2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da","PaymentKey":"AEC974D455FF4A4B9B4C21E437A04838","Description":null}}'; +$post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c","ServiceCode":"ideal", +"Status":{"Code":{"Code":190,"Description":"Success"},"SubCode":{"Code":"S001", +"Description":"Transaction successfully processed"},"DateTime":"2022-07-19T12:46:12"},"IsTest":true, +"Order":"ORDER_NO_62d68b6ca2df3","Currency":"EUR","AmountDebit":10.1,"TransactionType":"C021", +"Services":[{"Name":"ideal","Action":null,"Parameters":[{"Name":"consumerIssuer","Value":"ABN AMRO"}, +{"Name":"transactionId","Value":"0000000000000001"},{"Name":"consumerName","Value":"J. de Tèster"}, +{"Name":"consumerIBAN","Value":"NL44RABO0123456789"},{"Name":"consumerBIC","Value":"RABONL2U"}], +"VersionAsProperty":2}],"CustomParameters":null,"AdditionalParameters":{"List":[{"Name":"initiated_by_magento", +"Value":"1"},{"Name":"service_action","Value":"something"}]},"MutationType":1,"RelatedTransactions":null, +"IsCancelable":false,"IssuingCountry":null,"StartRecurrent":false,"Recurring":false,"CustomerName":"J. de Tèster", +"PayerHash":"2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734 +cc568816f9bd59c2092911e6c0da","PaymentKey":"AEC974D455FF4A4B9B4C21E437A04838","Description":null}}'; $uri = 'https://buckaroo.dev/push'; $reply_handler = new ReplyHandler($buckaroo->client()->config(), $post_data, $auth_header, $uri); diff --git a/example/responses/return.php b/example/responses/return.php index 319091bc..99aa5410 100644 --- a/example/responses/return.php +++ b/example/responses/return.php @@ -1,6 +1,6 @@ "J. de Tèster", "brq_invoicenumber" => "SDKDevelopment.com_INVOICE_NO_628c6d032af90", "brq_ordernumber" => "SDKDevelopment.com_ORDER_NO_628c6d032af95", - "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da", + "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f966 + 69a21651d4734cc568816f9bd59c2092911e6c0da", "brq_payment" => "D44ACDD0F99D4A1C811D2CD3EFDB05BA", "brq_payment_method" => "ideal", "brq_SERVICE_ideal_consumerBIC" => "RABONL2U", diff --git a/example/transactions/afterpay.php b/example/transactions/afterpay.php index 80ff3eab..885148bc 100644 --- a/example/transactions/afterpay.php +++ b/example/transactions/afterpay.php @@ -1,6 +1,6 @@ [ 'mobile' => '0698765433', - 'landline' => '0109876543', + 'landline' => '0109876541', ], 'email' => 'test@buckaroo.nl', ], @@ -103,7 +103,7 @@ 'firstName' => 'Test', 'lastName' => 'Acceptatie', 'email' => 'billingcustomer@buckaroo.nl', - 'phone' => '0109876543', + 'phone' => '0109876542', 'street' => 'Hoofdstraat', 'streetNumber' => '80', 'streetNumberAdditional' => 'A', diff --git a/example/transactions/afterpaydigiaccept.php b/example/transactions/afterpaydigiaccept.php index eb9f01b1..bd3eb614 100644 --- a/example/transactions/afterpaydigiaccept.php +++ b/example/transactions/afterpaydigiaccept.php @@ -1,6 +1,6 @@ method('bancontactmrcash')->pay([ - //'saveToken' => true, //SaveToken is the parameter used to indicate if a token is to be created, that can be used for Wallet Initiated Payments in the future. - //'encryptedCardData' => '', //If this is set PayEncryoted Action will be used. The value of this parameter is the result of the "encryptCardData"-function of our Client Side Encryption SDK. + //'saveToken' => true, //SaveToken is the parameter used to indicate if a token is to be created, that can be used + // for Wallet Initiated Payments in the future. + //'encryptedCardData' => '', //If this is set PayEncryoted Action will be used. + // The value of this parameter is the result of the "encryptCardData"-function of our Client Side Encryption SDK. 'invoice' => uniqid(), 'amountDebit' => 10.10, ]); @@ -20,7 +22,10 @@ 'invoice' => uniqid(), 'amountDebit' => 10.10, 'description' => 'Bancontact PayEncrypted Test 123', - 'encryptedCardData' => '001SlXfd8MbiTd/JFwCiGVs3f6o4x6xt0aN29NzOSNZHPKlVsz/EWeQmyhb1gGZ86VY88DP7gfDV+UyjcPfpVfHZd7u+WkO71hnV2QfYILCBNqE1aiPv2GQVGdaGbuoQloKu1o3o3I1UDmVxivXTMQX76ovot89geA6hqbtakmpmvxeiwwea3l4htNoX1IlD1hfYkDDl9rzSu5ypcjvVs6aRGXK5iMHnyrmEsEnfdj/Q5XWbsD5xAm4u3y6J8d4UP7LB31VLECzZUTiJOtKKcCQlT01YThIkQlj8PWBBMtt4H52VN3IH2+wPYtR8HiOZzcA2HA7UxozogIpS53tIURj/g==', + 'encryptedCardData' => '001SlXfd8MbiTd/JFwCiGVs3f6o4x6xt0aN29NzOSNZHPKlVsz/EWeQmyhb1gGZ86VY88DP7gfDV+UyjcP + fpVfHZd7u+WkO71hnV2QfYILCBNqE1aiPv2GQVGdaGbuoQloKu1o3o3I1UDmVxivXTMQX76ovot89geA6hqbtakmpmvxeiwwea3l4htNoX + 1IlD1hfYkDDl9rzSu5ypcjvVs6aRGXK5iMHnyrmEsEnfdj/Q5XWbsD5xAm4u3y6J8d4UP7LB31VLECzZUTiJOtKKcCQlT01YThIkQlj8PW + BBMtt4H52VN3IH2+wPYtR8HiOZzcA2HA7UxozogIpS53tIURj/g==', ]); //Recurrent payment diff --git a/example/transactions/belfius.php b/example/transactions/belfius.php index 06945fd0..3b70e42c 100644 --- a/example/transactions/belfius.php +++ b/example/transactions/belfius.php @@ -1,6 +1,6 @@ method('billink')->cancelAuthorize([ - 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', //Set transaction key of the authorized transaction to cancel + 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', + //Set transaction key of the authorized transaction to cancel 'invoice' => '62905fa2650f4', //Set invoice id 'AmountCredit' => 10, //set amount to capture ]); diff --git a/example/transactions/credit_click.php b/example/transactions/credit_click.php index 32187c1f..63a3c9fe 100644 --- a/example/transactions/credit_click.php +++ b/example/transactions/credit_click.php @@ -1,6 +1,6 @@ 10, 'invoice' => uniqid(), 'name' => 'mastercard', - 'cardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'cardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); //Pay with security code @@ -27,7 +28,8 @@ 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); //Refund @@ -50,7 +52,8 @@ 'amountDebit' => 10, 'invoice' => uniqid(), 'name' => 'mastercard', - 'cardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'cardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); //Authorize with security code @@ -59,7 +62,8 @@ 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); //Capture @@ -68,7 +72,8 @@ 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); //Pay Recurrent @@ -77,5 +82,6 @@ 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); diff --git a/example/transactions/eps.php b/example/transactions/eps.php index 426ed7ae..06530240 100644 --- a/example/transactions/eps.php +++ b/example/transactions/eps.php @@ -1,6 +1,6 @@ method('giftcard')->payRedirect([ 'amountDebit' => 10, 'invoice' => uniqid(), - 'servicesSelectableByClient' => 'westlandbon,ideal,babygiftcard,babyparkgiftcard,beautywellness,boekenbon,boekenvoordeel,designshopsgiftcard,fashioncheque,fashionucadeaukaart,fijncadeau,koffiecadeau,kokenzo,kookcadeau,nationaleentertainmentcard,naturesgift,podiumcadeaukaart,shoesaccessories,webshopgiftcard,wijncadeau,wonenzo,yourgift,vvvgiftcard,parfumcadeaukaart', + 'servicesSelectableByClient' => 'westlandbon,ideal,babygiftcard,babyparkgiftcard,beautywellness,boekenbon, + boekenvoordeel,designshopsgiftcard,fashioncheque,fashionucadeaukaart,fijncadeau,koffiecadeau,kokenzo, + kookcadeau,nationaleentertainmentcard,naturesgift,podiumcadeaukaart,shoesaccessories,webshopgiftcard, + wijncadeau,wonenzo,yourgift,vvvgiftcard,parfumcadeaukaart', 'continueOnIncomplete' => '1', ]); diff --git a/example/transactions/giropay.php b/example/transactions/giropay.php index d1cfbac0..625da64f 100644 --- a/example/transactions/giropay.php +++ b/example/transactions/giropay.php @@ -1,6 +1,6 @@ 'Articlenumber1', 'type' => 'Physical', 'description' => 'Blue Toy Car', - 'category' => 'test product', + 'category' => 'test product1', 'vatPercentage' => '21', 'quantity' => '2', 'price' => '20.10', @@ -69,7 +69,7 @@ 'identifier' => 'Articlenumber2', 'type' => 'Physical', 'description' => 'Red Toy Car', - 'category' => 'test product', + 'category' => 'test product2', 'vatPercentage' => '21', 'quantity' => '1', 'price' => '10.10', @@ -78,7 +78,7 @@ 'identifier' => 'USPShippingID', 'type' => 'Physical', 'description' => 'UPS', - 'category' => 'test product', + 'category' => 'test product3', 'vatPercentage' => '21', 'quantity' => '1', 'price' => '2', diff --git a/example/transactions/in3old.php b/example/transactions/in3old.php index 77272c07..3bf41c7d 100644 --- a/example/transactions/in3old.php +++ b/example/transactions/in3old.php @@ -1,6 +1,5 @@ method('mbway')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, +]); + +//Refund +$response = $buckaroo->method('mbway')->refund([ + 'invoice' => '', //Set invoice number of the transaction to refund + 'originalTransactionKey' => '', //Set transaction key of the transaction to refund + 'amountCredit' => 10.10, +]); diff --git a/example/transactions/multibanco.php b/example/transactions/multibanco.php new file mode 100644 index 00000000..80b1c92a --- /dev/null +++ b/example/transactions/multibanco.php @@ -0,0 +1,21 @@ +method('multibanco')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, +]); + +//Refund +$response = $buckaroo->method('multibanco')->refund([ + 'invoice' => '', //Set invoice number of the transaction to refund + 'originalTransactionKey' => '', //Set transaction key of the transaction to refund + 'amountCredit' => 10.10, +]); diff --git a/example/transactions/noservicespecified.php b/example/transactions/noservicespecified.php index c68fde4f..31f2c3f5 100644 --- a/example/transactions/noservicespecified.php +++ b/example/transactions/noservicespecified.php @@ -1,6 +1,6 @@ 'Phone', - 'mobile' => 'MobilePhone', + 'mobile' => 'MobilePhone' ]; } diff --git a/src/PaymentMethods/AfterpayDigiAccept/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/AfterpayDigiAccept/Service/ParameterKeys/PhoneAdapter.php index d3fb8802..d8fd974d 100644 --- a/src/PaymentMethods/AfterpayDigiAccept/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/AfterpayDigiAccept/Service/ParameterKeys/PhoneAdapter.php @@ -23,6 +23,6 @@ class PhoneAdapter extends ServiceAdapter { protected array $keys = [ - 'mobile' => 'PhoneNumber', + 'mobile' => 'PhoneNumber' ]; } diff --git a/src/PaymentMethods/Billink/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/Billink/Service/ParameterKeys/PhoneAdapter.php index e8e80660..98a4a3d5 100644 --- a/src/PaymentMethods/Billink/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/Billink/Service/ParameterKeys/PhoneAdapter.php @@ -25,7 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'landLine' => 'Phone', - 'mobile' => 'MobilePhone', + 'mobile' => 'MobilePhone' ]; } diff --git a/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php index dbba7c25..f18dd568 100644 --- a/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php @@ -25,8 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'landLine' => 'Phone', - 'mobile' => 'MobilePhone', - 'phone' => 'Phone' + 'mobile' => 'MobilePhone' ]; } diff --git a/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php index 14bb2750..17af7e7c 100644 --- a/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php @@ -25,6 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'mobile' => 'Phone', + 'mobile' => 'Phone' ]; } diff --git a/src/PaymentMethods/KlarnaKP/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/KlarnaKP/Service/ParameterKeys/PhoneAdapter.php index d1d295fa..f345e2ad 100644 --- a/src/PaymentMethods/KlarnaKP/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/KlarnaKP/Service/ParameterKeys/PhoneAdapter.php @@ -25,7 +25,6 @@ class PhoneAdapter extends RecipientAdapter { protected array $keys = [ - 'landLine' => 'PhoneNumber', - 'mobile' => 'CellPhoneNumber', + 'mobile' => 'CellPhoneNumber' ]; } diff --git a/src/PaymentMethods/KlarnaPay/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/KlarnaPay/Service/ParameterKeys/PhoneAdapter.php index da15397f..306bfff9 100644 --- a/src/PaymentMethods/KlarnaPay/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/KlarnaPay/Service/ParameterKeys/PhoneAdapter.php @@ -25,6 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'mobile' => 'Phone', + 'mobile' => 'Phone' ]; } diff --git a/src/PaymentMethods/MBWay/MBWay.php b/src/PaymentMethods/MBWay/MBWay.php new file mode 100644 index 00000000..89e74aaa --- /dev/null +++ b/src/PaymentMethods/MBWay/MBWay.php @@ -0,0 +1,30 @@ +payload)); } + + /** + * @return array + * @throws BuckarooException + */ + public function issuers(): array + { + $this->serviceVersion = 1; + + return $this->traitIssuers(); + } } diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index ca9149df..c675167a 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -36,6 +36,7 @@ use Buckaroo\PaymentMethods\CreditManagement\CreditManagement; use Buckaroo\PaymentMethods\Emandates\Emandates; use Buckaroo\PaymentMethods\EPS\EPS; +use Buckaroo\PaymentMethods\MBWay\MBWay; use Buckaroo\PaymentMethods\GiftCard\GiftCard; use Buckaroo\PaymentMethods\Giropay\Giropay; use Buckaroo\PaymentMethods\iDeal\iDeal; @@ -47,6 +48,7 @@ use Buckaroo\PaymentMethods\KlarnaKP\KlarnaKP; use Buckaroo\PaymentMethods\KlarnaPay\KlarnaPay; use Buckaroo\PaymentMethods\Marketplaces\Marketplaces; +use Buckaroo\PaymentMethods\Multibanco\Multibanco; use Buckaroo\PaymentMethods\NoServiceSpecifiedPayment\NoServiceSpecifiedPayment; use Buckaroo\PaymentMethods\Payconiq\Payconiq; use Buckaroo\PaymentMethods\PaymentInitiation\PaymentInitiation; @@ -95,6 +97,8 @@ class PaymentMethodFactory In3Old::class => ['in3old'], KlarnaPay::class => ['klarna', 'klarnain'], KlarnaKP::class => ['klarnakp'], + Multibanco::class => ['multibanco'], + MBWay::class => ['mbway'], Surepay::class => ['surepay'], Subscriptions::class => ['subscriptions'], SEPA::class => ['sepadirectdebit', 'sepa'], diff --git a/src/PaymentMethods/Paypal/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/Paypal/Service/ParameterKeys/PhoneAdapter.php index c86325eb..ba83d94b 100644 --- a/src/PaymentMethods/Paypal/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/Paypal/Service/ParameterKeys/PhoneAdapter.php @@ -25,6 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'mobile' => 'Phone', + 'mobile' => 'Phone' ]; } diff --git a/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php index 7107fa2c..e9638788 100644 --- a/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php @@ -25,6 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'mobile' => 'Phone', + 'mobile' => 'Phone' ]; } diff --git a/src/PaymentMethods/iDeal/iDeal.php b/src/PaymentMethods/iDeal/iDeal.php index 2596c684..dbd07614 100644 --- a/src/PaymentMethods/iDeal/iDeal.php +++ b/src/PaymentMethods/iDeal/iDeal.php @@ -22,14 +22,19 @@ namespace Buckaroo\PaymentMethods\iDeal; +use Buckaroo\Exceptions\BuckarooException; use Buckaroo\Models\Model; use Buckaroo\PaymentMethods\iDeal\Models\Pay; use Buckaroo\PaymentMethods\PayablePaymentMethod; -use Buckaroo\Transaction\Request\TransactionRequest; +use Buckaroo\Services\TraitHelpers\HasIssuers; use Buckaroo\Transaction\Response\TransactionResponse; class iDeal extends PayablePaymentMethod { + use HasIssuers { + issuers as traitIssuers; + } + /** * @var string */ @@ -72,33 +77,12 @@ public function instantRefund(?Model $model = null):TransactionResponse /** * @return array - * @throws \Buckaroo\Exceptions\BuckarooException + * @throws BuckarooException */ public function issuers(): array { - $request = new TransactionRequest; - - try - { - $response = $this->client->specification($request, 'ideal', 2); - } catch (BuckarooException $e) - { - return []; - } - - $issuerList = []; - if (isset($response->data()['Actions']['0']['RequestParameters'][0]['ListItemDescriptions'])) - { - $issuersData = $response->data()['Actions']['0']['RequestParameters'][0]['ListItemDescriptions']; - if (count($issuersData) > 0) - { - foreach ($issuersData as $issuer) - { - $issuerList[] = ['id' => $issuer['Value'], 'name' => $issuer['Description']]; - } - } - } + $this->serviceVersion = 2; - return $issuerList; + return $this->traitIssuers(); } } diff --git a/src/Services/TraitHelpers/HasIssuers.php b/src/Services/TraitHelpers/HasIssuers.php new file mode 100644 index 00000000..0b928237 --- /dev/null +++ b/src/Services/TraitHelpers/HasIssuers.php @@ -0,0 +1,59 @@ +client->specification($request, $this->paymentName, $this->serviceVersion()); + } catch (BuckarooException $e) + { + return []; + } + + $issuerList = []; + if (isset($response->data()['Actions']['0']['RequestParameters'][0]['ListItemDescriptions'])) + { + $issuersData = $response->data()['Actions']['0']['RequestParameters'][0]['ListItemDescriptions']; + if (count($issuersData) > 0) + { + foreach ($issuersData as $issuer) + { + $issuerList[] = ['id' => $issuer['Value'], 'name' => $issuer['Description']]; + } + } + } + + return $issuerList; + } +} diff --git a/src/Transaction/Request/Request.php b/src/Transaction/Request/Request.php index aa5f3700..c91911c2 100644 --- a/src/Transaction/Request/Request.php +++ b/src/Transaction/Request/Request.php @@ -78,32 +78,6 @@ public function jsonSerialize(): mixed return $this->data; } - /** - * Redirect all method calls prefixed with 'get' or 'set' - * to check if a param exists with that name - * Return or set the param if it does - * - * @param string $method - * @param array $args - * @return mixed - */ - public function __call($method, $args) - { - $prefix = substr($method, 0, 3); - $param = substr($method, 3); - $arg = isset($args[0]) ? $args[0] : null; - - if ($prefix === 'set') - { - return $this->offsetSet($param, $arg); - } elseif ($prefix === 'get') - { - return $this->offsetGet($param); - } - - throw new Exception("Call to undefined method " . __CLASS__ . '::' . $method); - } - /** Implement Arrayable */ public function toArray(): array { diff --git a/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php b/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php index 95409eff..0e5dca6e 100644 --- a/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php +++ b/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php @@ -60,21 +60,6 @@ public function it_creates_a_afterpaydigiaccept_capture() $this->assertTrue($response->isFailed()); } -// /** -// * @return void -// * @test -// */ -// public function it_creates_a_afterpaydigiaccept_cancel_authorize() -// { -// $response = $this->buckaroo->method('afterpaydigiaccept')->cancelAuthorize([ -// 'amountCredit' => 10, -// 'invoice' => '10000480', -// 'originalTransactionKey' => '9AA4C81A08A84FA7B68E6A6A6291XXXX' -// ]); -// -// $this->assertTrue($response->isFailed()); -// } - /** * @return void * @test diff --git a/tests/Buckaroo/Payments/AfterpayTest.php b/tests/Buckaroo/Payments/AfterpayTest.php index 86841ec0..a92d30d0 100644 --- a/tests/Buckaroo/Payments/AfterpayTest.php +++ b/tests/Buckaroo/Payments/AfterpayTest.php @@ -47,21 +47,6 @@ public function it_creates_a_afterpay_authorize() $this->assertTrue($response->isSuccess()); } -// /** -// * @return void -// * @test -// */ -// public function it_creates_a_afterpay_cancel_authorize() -// { -// $response = $this->buckaroo->method('afterpay')->cancelAuthorize([ -// 'amountCredit' => 10, -// 'originalTransactionKey' => 'F86579ECED1D493887ECAE7C287BXXXX', -// 'invoice' => 'testinvoice12345cvx' -// ]); -// -// $this->assertTrue($response->isRejected()); -// } - /** * @return void * @test @@ -83,7 +68,8 @@ public function it_creates_a_afterpay_refund() { $response = $this->buckaroo->method('afterpay')->refund([ 'invoice' => 'testinvoice 123', //Set invoice number of the transaction to refund - 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', //Set transaction key of the transaction to refund + 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', + //Set transaction key of the transaction to refund 'amountCredit' => 1.23, ]); @@ -98,7 +84,8 @@ public function it_creates_a_afterpay_partial_refund() { $response = $this->buckaroo->method('afterpay')->refund([ 'invoice' => 'testinvoice 123', //Set invoice number of the transaction to refund - 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', //Set transaction key of the transaction to refund + 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', + //Set transaction key of the transaction to refund 'amountCredit' => 1.23, 'articles' => [ [ diff --git a/tests/Buckaroo/Payments/BancontactTest.php b/tests/Buckaroo/Payments/BancontactTest.php index be9606f5..e4f93522 100644 --- a/tests/Buckaroo/Payments/BancontactTest.php +++ b/tests/Buckaroo/Payments/BancontactTest.php @@ -63,7 +63,10 @@ public function it_creates_a_bancontact_encrypted_payment() 'invoice' => uniqid(), 'amountDebit' => 10.10, 'description' => 'Bancontact PayEncrypted Test 123', - 'encryptedCardData' => '001SlXfd8MbiTd/JFwCiGVs3f6o4x6xt0aN29NzOSNZHPKlVsz/EWeQmyhb1gGZ86VY88DP7gfDV+UyjcPfpVfHZd7u+WkO71hnV2QfYILCBNqE1aiPv2GQVGdaGbuoQloKu1o3o3I1UDmVxivXTMQX76ovot89geA6hqbtakmpmvxeiwwea3l4htNoX1IlD1hfYkDDl9rzSu5ypcjvVs6aRGXK5iMHnyrmEsEnfdj/Q5XWbsD5xAm4u3y6J8d4UP7LB31VLECzZUTiJOtKKcCQlT01YThIkQlj8PWBBMtt4H52VN3IH2+wPYtR8HiOZzcA2HA7UxozogIpS53tIURj/g==', + 'encryptedCardData' => '001SlXfd8MbiTd/JFwCiGVs3f6o4x6xt0aN29NzOSNZHPKlVsz/EWeQmyhb1gGZ86VY88DP7gf + DV+UyjcPfpVfHZd7u+WkO71hnV2QfYILCBNqE1aiPv2GQVGdaGbuoQloKu1o3o3I1UDmVxivXTMQX76ovot89geA6hqbtakmpm + vxeiwwea3l4htNoX1IlD1hfYkDDl9rzSu5ypcjvVs6aRGXK5iMHnyrmEsEnfdj/Q5XWbsD5xAm4u3y6J8d4UP7LB31VLECzZUT + iJOtKKcCQlT01YThIkQlj8PWBBMtt4H52VN3IH2+wPYtR8HiOZzcA2HA7UxozogIpS53tIURj/g==', ]); $this->assertTrue($response->isPendingProcessing()); diff --git a/tests/Buckaroo/Payments/BatchTest.php b/tests/Buckaroo/Payments/BatchTest.php index aa3db504..8c948e6a 100644 --- a/tests/Buckaroo/Payments/BatchTest.php +++ b/tests/Buckaroo/Payments/BatchTest.php @@ -82,4 +82,4 @@ public function it_tests_batch_api() $this->assertTrue($response->data('Message') == '3 data requests were queued for processing.'); } -} \ No newline at end of file +} diff --git a/tests/Buckaroo/Payments/BillinkTest.php b/tests/Buckaroo/Payments/BillinkTest.php index 599aad46..51015a9f 100644 --- a/tests/Buckaroo/Payments/BillinkTest.php +++ b/tests/Buckaroo/Payments/BillinkTest.php @@ -50,7 +50,8 @@ public function it_creates_a_billink_authorize() public function it_creates_a_billink_capture() { $response = $this->buckaroo->method('billink')->capture([ - 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', //Set transaction key of the transaction to capture + 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', + //Set transaction key of the transaction to capture 'invoice' => '62905fa2650f4', //Set invoice id 'amountDebit' => 50.30, //set amount to capture 'articles' => [ @@ -169,7 +170,8 @@ private function getPaymentPayload(): array public function it_creates_a_billink_cancel_authorize() { $response = $this->buckaroo->method('billink')->cancelAuthorize([ - 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', //Set transaction key of the transaction to capture + 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', + //Set transaction key of the transaction to capture 'invoice' => '62905fa2650f4', //Set invoice id 'AmountCredit' => 10, //set amount to capture ]); diff --git a/tests/Buckaroo/Payments/CreditcardTest.php b/tests/Buckaroo/Payments/CreditcardTest.php index a877af45..9ff06630 100644 --- a/tests/Buckaroo/Payments/CreditcardTest.php +++ b/tests/Buckaroo/Payments/CreditcardTest.php @@ -49,7 +49,8 @@ public function it_creates_a_creditcard_encrypted_payment() 'amountDebit' => 10, 'invoice' => uniqid(), 'name' => 'mastercard', - 'encryptedCardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'encryptedCardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU + 9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); $this->assertTrue($response->isValidationFailure()); @@ -66,7 +67,8 @@ public function it_creates_a_creditcard_security_code_payment() 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'encryptedSecurityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'encryptedSecurityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2 + KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); $this->assertTrue($response->isValidationFailure()); @@ -113,7 +115,8 @@ public function it_creates_a_creditcard_encrypted_authorize() 'amountDebit' => 10, 'invoice' => uniqid(), 'name' => 'mastercard', - 'encryptedCardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'encryptedCardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU + 9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); $this->assertTrue($response->isValidationFailure()); @@ -130,7 +133,8 @@ public function it_creates_a_creditcard_security_code_authorize() 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'encryptedSecurityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'encryptedSecurityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU + 9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); $this->assertTrue($response->isValidationFailure()); diff --git a/tests/Buckaroo/Payments/IdealTest.php b/tests/Buckaroo/Payments/IdealTest.php index a8f5c177..6b402c10 100644 --- a/tests/Buckaroo/Payments/IdealTest.php +++ b/tests/Buckaroo/Payments/IdealTest.php @@ -63,7 +63,8 @@ protected function setUp(): void $this->refundPayload = [ 'invoice' => 'testinvoice 123', //Set invoice number of the transaction to refund - 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', //Set transaction key of the transaction to refund + 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', + //Set transaction key of the transaction to refund 'amountCredit' => 1.23, 'clientIP' => [ 'address' => '123.456.789.123', @@ -76,6 +77,23 @@ protected function setUp(): void ]; } + /** + * @return void + * @test + */ + public function it_get_ideal_issuers() + { + $response = $this->buckaroo->method('ideal')->issuers(); + + $this->assertIsArray($response); + foreach ($response as $item) + { + $this->assertIsArray($item); + $this->assertArrayHasKey('id', $item); + $this->assertArrayHasKey('name', $item); + } + } + /** * @return void * @test @@ -85,12 +103,6 @@ public function it_creates_a_ideal_payment() $response = $this->buckaroo->method('idealprocessing')->pay($this->paymentPayload); $this->assertTrue($response->isPendingProcessing()); - -// $customConfig = new CustomConfig(); -// $customConfig->currency('AUD'); -// -// $response = $this->buckaroo->setConfig($customConfig)->payment('ideal')->pay(json_encode($this->paymentPayload)); -// $this->assertTrue($response->isPendingProcessing()); } /** diff --git a/tests/Buckaroo/Payments/MBWayTest.php b/tests/Buckaroo/Payments/MBWayTest.php new file mode 100644 index 00000000..dd7878ca --- /dev/null +++ b/tests/Buckaroo/Payments/MBWayTest.php @@ -0,0 +1,55 @@ +buckaroo->method('mbway')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, + ]); + + $this->assertTrue($response->isPendingProcessing()); + } + + /** + * @test + */ + public function it_creates_a_mbway_refund() + { + $response = $this->buckaroo->method('mbway')->refund([ + 'amountCredit' => 10, + 'invoice' => 'testinvoice 123', + 'description' => 'refund', + 'originalTransactionKey' => '2D04704995B74D679AACC59F87XXXXXX', + ]); + + $this->assertTrue($response->isFailed()); + } +} diff --git a/tests/Buckaroo/Payments/MarketplacesTest.php b/tests/Buckaroo/Payments/MarketplacesTest.php index 715f12c6..d301385b 100644 --- a/tests/Buckaroo/Payments/MarketplacesTest.php +++ b/tests/Buckaroo/Payments/MarketplacesTest.php @@ -98,7 +98,8 @@ public function it_creates_marketplaces_refund() $response = $this->buckaroo->method('ideal')->combine($marketplace)->refund([ 'invoice' => 'testinvoice 123', //Set invoice number of the transaction to refund - 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', //Set transaction key of the transaction to refund + 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', + //Set transaction key of the transaction to refund 'amountCredit' => 30, ]); diff --git a/tests/Buckaroo/Payments/MultibancoTest.php b/tests/Buckaroo/Payments/MultibancoTest.php new file mode 100644 index 00000000..b8d4c753 --- /dev/null +++ b/tests/Buckaroo/Payments/MultibancoTest.php @@ -0,0 +1,55 @@ +buckaroo->method('multibanco')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, + ]); + + $this->assertTrue($response->isPendingProcessing()); + } + + /** + * @test + */ + public function it_creates_a_multibanco_refund() + { + $response = $this->buckaroo->method('multibanco')->refund([ + 'amountCredit' => 10, + 'invoice' => 'testinvoice 123', + 'description' => 'refund', + 'originalTransactionKey' => '2D04704995B74D679AACC59F87XXXXXX', + ]); + + $this->assertTrue($response->isFailed()); + } +} diff --git a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php index bef3e411..effdfe20 100644 --- a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php +++ b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php @@ -39,4 +39,4 @@ public function it_creates_a_noservice_payment() $this->assertTrue($response->isWaitingOnUserInput()); } -} \ No newline at end of file +} diff --git a/tests/Buckaroo/Payments/PaymentInitiation.php b/tests/Buckaroo/Payments/PaymentInitiation.php index 3759c63d..14b39b1a 100644 --- a/tests/Buckaroo/Payments/PaymentInitiation.php +++ b/tests/Buckaroo/Payments/PaymentInitiation.php @@ -4,8 +4,24 @@ use Tests\Buckaroo\BuckarooTestCase; -class PaymentInitiation extends BuckarooTestCase +class PaymentInitiationTest extends BuckarooTestCase { + /** + * @return void + * @test + */ + public function it_get_payment_initiation_issuers() + { + $response = $this->buckaroo->method('paybybank')->issuers(); + + $this->assertIsArray($response); + foreach ($response as $item) + { + $this->assertIsArray($item); + $this->assertArrayHasKey('id', $item); + $this->assertArrayHasKey('name', $item); + } + } /** * @test diff --git a/tests/Buckaroo/Payments/PushTest.php b/tests/Buckaroo/Payments/PushTest.php index 3aab3f4d..a2ec3b9b 100644 --- a/tests/Buckaroo/Payments/PushTest.php +++ b/tests/Buckaroo/Payments/PushTest.php @@ -39,8 +39,21 @@ public function it_test_the_push_response() $replyHandler = $this->buckaroo->method('ideal'); - $auth_header = 'IBjihN7Fhp:0YvyjYAzDQ28W+hQi80f2nhe0Z1QFJLbz7IH//6LsAU=:cad1832100784f57a6e6de835d9f3638:1658227572'; - $post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c","ServiceCode":"ideal","Status":{"Code":{"Code":190,"Description":"Success"},"SubCode":{"Code":"S001","Description":"Transaction successfully processed"},"DateTime":"2022-07-19T12:46:12"},"IsTest":true,"Order":"ORDER_NO_62d68b6ca2df3","Currency":"EUR","AmountDebit":10.1,"TransactionType":"C021","Services":[{"Name":"ideal","Action":null,"Parameters":[{"Name":"consumerIssuer","Value":"ABN AMRO"},{"Name":"transactionId","Value":"0000000000000001"},{"Name":"consumerName","Value":"J. de Tèster"},{"Name":"consumerIBAN","Value":"NL44RABO0123456789"},{"Name":"consumerBIC","Value":"RABONL2U"}],"VersionAsProperty":2}],"CustomParameters":null,"AdditionalParameters":{"List":[{"Name":"initiated_by_magento","Value":"1"},{"Name":"service_action","Value":"something"}]},"MutationType":1,"RelatedTransactions":null,"IsCancelable":false,"IssuingCountry":null,"StartRecurrent":false,"Recurring":false,"CustomerName":"J. de Tèster","PayerHash":"2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da","PaymentKey":"AEC974D455FF4A4B9B4C21E437A04838","Description":null}}'; + $auth_header = 'IBjihN7Fhp:0YvyjYAzDQ28W+hQi80f2nhe0Z1QFJLbz7IH//6LsAU=:cad1832100784f57a6e6de835d9f3638: + 1658227572'; + $post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c", + "ServiceCode":"ideal","Status":{"Code":{"Code":190,"Description":"Success"},"SubCode":{"Code":"S001", + "Description":"Transaction successfully processed"},"DateTime":"2022-07-19T12:46:12"},"IsTest":true, + "Order":"ORDER_NO_62d68b6ca2df3","Currency":"EUR","AmountDebit":10.1,"TransactionType":"C021", + "Services":[{"Name":"ideal","Action":null,"Parameters":[{"Name":"consumerIssuer","Value":"ABN AMRO"}, + {"Name":"transactionId","Value":"0000000000000001"},{"Name":"consumerName","Value":"J. de Tèster"}, + {"Name":"consumerIBAN","Value":"NL44RABO0123456789"},{"Name":"consumerBIC","Value":"RABONL2U"}], + "VersionAsProperty":2}],"CustomParameters":null,"AdditionalParameters":{"List":[{"Name": + "initiated_by_magento","Value":"1"},{"Name":"service_action","Value":"something"}]},"MutationType":1, + "RelatedTransactions":null,"IsCancelable":false,"IssuingCountry":null,"StartRecurrent":false, + "Recurring":false,"CustomerName":"J. de Tèster","PayerHash":"2d26d34584a4eafeeaa97eed10cfdae22ae64cdce + 1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da","PaymentKey": + "AEC974D455FF4A4B9B4C21E437A04838","Description":null}}'; $uri = 'https://buckaroo.dev/push'; $post_data = [ @@ -49,7 +62,8 @@ public function it_test_the_push_response() "brq_customer_name" => "J. de Tèster", "brq_invoicenumber" => "SDKDevelopment.com_INVOICE_NO_628c6d032af90", "brq_ordernumber" => "SDKDevelopment.com_ORDER_NO_628c6d032af95", - "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da", + "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7 + c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da", "brq_payment" => "D44ACDD0F99D4A1C811D2CD3EFDB05BA", "brq_payment_method" => "ideal", "brq_SERVICE_ideal_consumerBIC" => "RABONL2U", @@ -67,32 +81,6 @@ public function it_test_the_push_response() "brq_signature" => "bf7a62c830da2d2e004199919a8fe0d53b0668f5", ]; -// $post_data = [ -// "BRQ_AMOUNT" => "10.10", -// "BRQ_CURRENCY" => "EUR", -// "BRQ_CUSTOMER_NAME" => "J. de Tèster", -// "BRQ_INVOICENUMBER" => "63208dbcb5702", -// "BRQ_ORDERNUMBER" => "ORDER_NO_63208dbcd10e2", -// "BRQ_PAYER_HASH" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da", -// "BRQ_PAYMENT" => "7F817F3A3F614062AC3E6EE634B2699F", -// "BRQ_PAYMENT_METHOD" => "ideal", -// "BRQ_SERVICE_IDEAL_CONSUMERBIC" => "RABONL2U", -// "BRQ_SERVICE_IDEAL_CONSUMERIBAN" => "NL44RABO0123456789", -// "BRQ_SERVICE_IDEAL_CONSUMERISSUER" => "ABN AMRO", -// "BRQ_SERVICE_IDEAL_CONSUMERNAME" => "J. de Tèster", -// "BRQ_SERVICE_IDEAL_TRANSACTIONID" => "0000000000000001", -// "BRQ_STATUSCODE" => "190", -// "BRQ_STATUSCODE_DETAIL" => "S001", -// "BRQ_STATUSMESSAGE" => "Transaction successfully processed", -// "BRQ_TEST" => "true", -// "BRQ_TIMESTAMP" => "2022-09-13 16:03:58", -// "BRQ_TRANSACTIONS" => "BBEB99F178C64A7FB30667B6427D8064", -// "BRQ_WEBSITEKEY" => "IBjihN7Fhp", -// "BRQ_SIGNATURE" => "06de0e66b0df062df376fa619cc0792b2ed5f3fd", -// "ADD_INITIATED_BY_MAGENTO" => "1", -// "ADD_SERVICE_ACTION" => "something" -// ]; - $reply_handler = new ReplyHandler($this->buckaroo->client()->config(), $post_data, $auth_header, $uri); $reply_handler->validate();