Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/orders canceled #238

Open
wants to merge 2 commits into
base: release/2.5.4
Choose a base branch
from
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
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ public function process_payment( $order_id ) {
$this->set_order_reference_details( $order, $amazon_reference_id );
}

if ( 'Canceled' === $state ) {
throw new Exception( __( 'The order has been cancelled.', 'woocommerce-gateway-amazon-payments-advanced' ) );
}

// Check if we are under SCA.
$is_sca = WC_Amazon_Payments_Advanced_API_Legacy::is_sca_region();
// Confirm order reference.
Expand Down
4 changes: 2 additions & 2 deletions woocommerce-gateway-amazon-payments-advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WooCommerce Amazon Pay
* Plugin URI: https://woocommerce.com/products/pay-with-amazon/
* Description: Amazon Pay is embedded directly into your existing web site, and all the buyer interactions with Amazon Pay and Login with Amazon take place in embedded widgets so that the buyer never leaves your site. Buyers can log in using their Amazon account, select a shipping address and payment method, and then confirm their order. Requires an Amazon Pay seller account and supports USA, UK, Germany, France, Italy, Spain, Luxembourg, the Netherlands, Sweden, Portugal, Hungary, Denmark, and Japan.
* Version: 2.5.3
* Version: 2.5.4-rc1
* Author: Amazon Pay
* Author URI: https://pay.amazon.com/
* Text Domain: woocommerce-gateway-amazon-payments-advanced
Expand All @@ -19,7 +19,7 @@
* @package WC_Gateway_Amazon_Pay
*/

define( 'WC_AMAZON_PAY_VERSION', '2.5.3' ); // WRCS: DEFINED_VERSION.
define( 'WC_AMAZON_PAY_VERSION', '2.5.4-rc1' ); // WRCS: DEFINED_VERSION.
define( 'WC_AMAZON_PAY_VERSION_CV1', '1.13.1' );

// Declare HPOS compatibility.
Expand Down
Loading