From 09cd50f54b26aba85b23ee7c18bf6d0ea81c9fdb Mon Sep 17 00:00:00 2001 From: hogsim Date: Wed, 8 Jun 2022 18:31:02 +0200 Subject: [PATCH] Fix for banktransfer --- .DS_Store | Bin 0 -> 6148 bytes composer.json | 2 +- src/CcvOnlinePaymentsApi.php | 13 ++++++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..cb1edbe9ae97c43e147228d1e7659707dddfa706 GIT binary patch literal 6148 zcmeHKy-LJD5S}q90ybA#ZfPZ4El51#6Wj~P-N7kb$l*_6xA-PLfFQnrjgMqw=Qlg! zT^56#;>ir`e!KItv-v`HGepFb+r^k@L_`&uAj@DtL_KKQGiNcftg%{-r}M5|4=nOm zRkHVzj%Z1jbd&9$>9}ueyQZ0~x*2rU``z2){o(6rZeM(BUtjdNDV`8Y1zpn>&9kiZ z@Upe^a}vd8%V}|Kx6K$%HajwFmXCMol?XL1&VV!E3^)Tn$N=tak!oMjduPBIa0WIE z$oUY^1Z%^nn2ru~sRRI)P$$7yY6*!6hP7c-gayJH3e-@x5`#4y`e1&wVN}#`Vk=7.2.0", "ext-json": "*", diff --git a/src/CcvOnlinePaymentsApi.php b/src/CcvOnlinePaymentsApi.php index c6b7064..392452b 100644 --- a/src/CcvOnlinePaymentsApi.php +++ b/src/CcvOnlinePaymentsApi.php @@ -189,6 +189,8 @@ public function createPayment($request) { "billingState" => $request->getBillingState(), "billingPostalCode" => $request->getBillingPostalCode(), "billingCountry" => $request->getBillingCountry(), + # Missing billingEmail + "billingEmail" => $request->getAccountInfoEmail(), "billingHouseNumber" => $request->getBillingHouseNumber(), "billingHouseExtension" => $request->getBillingHouseExtension(), "billingPhoneNumber" => $request->getBillingPhoneNumber(), @@ -236,7 +238,16 @@ public function createPayment($request) { $paymentResponse = new PaymentResponse(); $paymentResponse->setReference($apiResponse->reference); - $paymentResponse->setPayUrl($apiResponse->payUrl); + # Start modification + if($apiResponse->method == 'banktransfer'){ + #payUrl does not exist for banktransfer + $paymentResponse->setPayUrl($apiResponse->returnUrl); + } + else { + #Original code below: + $paymentResponse->setPayUrl($apiResponse->payUrl); + } + # End modification return $paymentResponse; }