diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..cb1edbe Binary files /dev/null and b/.DS_Store differ diff --git a/composer.json b/composer.json index 32926e3..dd674a1 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "homepage": "https://github.com/CCV/ccvonlinepayments-php-lib", "license": "MIT", "type": "library", - "version": "1.3.2", + "version": "1.3.3", "require": { "php": ">=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; }