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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*",
Expand Down
13 changes: 12 additions & 1 deletion src/CcvOnlinePaymentsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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;
}

Expand Down