Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/1.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
luchaos committed Jan 20, 2020
2 parents 1902589 + d55317a commit f5a644c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## v1.7.1 (2020-01-20)
### Fixed
- Callback missing OK response

## v1.7.0 (2019-11-19)
### Added
- Explicit check of callback
Expand Down
2 changes: 1 addition & 1 deletion build.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* extension source version
*/
$version = '1.7.0';
$version = '1.7.1';

/**
* dist filename
Expand Down
15 changes: 10 additions & 5 deletions src/classes/includes/payment-gateway-cloud-creditcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,21 @@ public function process_payment($orderId)
// $errors = $result->getErrors();
return $this->paymentFailedResponse();
} elseif ($result->getReturnType() == PaymentGatewayCloud\Client\Transaction\Result::RETURN_TYPE_REDIRECT) {
// HOSTED PAYMENT PAGE OR SEAMLESS+3DS
/**
* hosted payment page or seamless+3DS
*/
return [
'result' => 'success',
'redirect' => $result->getRedirectUrl(),
];
} elseif ($result->getReturnType() == PaymentGatewayCloud\Client\Transaction\Result::RETURN_TYPE_PENDING) {
// payment is pending, wait for callback to complete
/**
* payment is pending, wait for callback to complete
*/
} elseif ($result->getReturnType() == PaymentGatewayCloud\Client\Transaction\Result::RETURN_TYPE_FINISHED) {

//seamless will finish here ONLY FOR NON-3DS SEAMLESS
/**
* seamless will finish here ONLY FOR NON-3DS SEAMLESS
*/
}
$woocommerce->cart->empty_cart();

Expand Down Expand Up @@ -293,7 +298,7 @@ public function process_callback()
}
}


die("OK");
}

public function init_form_fields()
Expand Down

0 comments on commit f5a644c

Please sign in to comment.