diff --git a/changelog.txt b/changelog.txt index 7c430bcfa..1428bde6d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -27,6 +27,7 @@ * Add - Disable unsupported payment methods in Stripe settings * Update - Update handling of PR as a country in the terminal locations endpoint. * Fix - Hide Amazon Pay in settings when legacy checkout is enabled. +* Fix - Fix subscription renewal issues for Amazon Pay. = 9.3.1 - 2025-03-14 = * Fix - Temporarily disables the subscriptions detached notice feature due to long loading times on stores with many subscriptions. diff --git a/includes/class-wc-stripe-customer.php b/includes/class-wc-stripe-customer.php index 65c208255..94a0accc9 100644 --- a/includes/class-wc-stripe-customer.php +++ b/includes/class-wc-stripe-customer.php @@ -26,6 +26,7 @@ class WC_Stripe_Customer { WC_Stripe_UPE_Payment_Method_ACH::STRIPE_ID, WC_Stripe_UPE_Payment_Method_ACSS::STRIPE_ID, WC_Stripe_UPE_Payment_Method_Bacs_Debit::STRIPE_ID, + WC_Stripe_UPE_Payment_Method_Amazon_Pay::STRIPE_ID, ]; /** diff --git a/includes/class-wc-stripe-intent-controller.php b/includes/class-wc-stripe-intent-controller.php index 7b0fb0f40..3662fa329 100644 --- a/includes/class-wc-stripe-intent-controller.php +++ b/includes/class-wc-stripe-intent-controller.php @@ -1010,6 +1010,7 @@ public function is_mandate_data_required( $selected_payment_type, $is_using_save $payment_methods_with_mandates = [ WC_Stripe_Payment_Methods::ACH, WC_Stripe_Payment_Methods::ACSS_DEBIT, + WC_Stripe_Payment_Methods::AMAZON_PAY, WC_Stripe_Payment_Methods::BACS_DEBIT, WC_Stripe_Payment_Methods::BECS_DEBIT, WC_Stripe_Payment_Methods::SEPA_DEBIT, diff --git a/includes/compat/trait-wc-stripe-subscriptions.php b/includes/compat/trait-wc-stripe-subscriptions.php index 5b704c381..f6aee0374 100644 --- a/includes/compat/trait-wc-stripe-subscriptions.php +++ b/includes/compat/trait-wc-stripe-subscriptions.php @@ -1010,6 +1010,10 @@ public function maybe_render_subscription_payment_method( $payment_method_to_dis /* translators: 1) the Bacs Direct Debit payment method's last 4 numbers */ $payment_method_to_display = sprintf( __( 'Via Bacs Direct Debit ending in (%1$s)', 'woocommerce-gateway-stripe' ), $source->bacs_debit->last4 ); break 3; + case WC_Stripe_Payment_Methods::AMAZON_PAY: + /* translators: 1) the Amazon Pay payment method's email */ + $payment_method_to_display = sprintf( __( 'Via Amazon Pay (%1$s)', 'woocommerce-gateway-stripe' ), $source->billing_details->email ?? '' ); + break 3; } } } diff --git a/includes/payment-methods/class-wc-stripe-upe-payment-gateway.php b/includes/payment-methods/class-wc-stripe-upe-payment-gateway.php index 256fff612..b56a340f4 100644 --- a/includes/payment-methods/class-wc-stripe-upe-payment-gateway.php +++ b/includes/payment-methods/class-wc-stripe-upe-payment-gateway.php @@ -1071,6 +1071,14 @@ private function process_payment_with_confirmation_token( int $order_id ) { } } + if ( $payment_information['save_payment_method_to_store'] ) { + $this->handle_saving_payment_method( + $order, + $payment_method, + $selected_payment_type + ); + } + $return_url = $this->get_return_url( $order ); return [ @@ -2223,6 +2231,8 @@ protected function prepare_payment_information_from_request( WC_Order $order ) { if ( is_a( $token, 'WC_Payment_Token_SEPA' ) ) { $selected_payment_type = WC_Stripe_UPE_Payment_Method_Sepa::STRIPE_ID; + } elseif ( is_a( $token, 'WC_Payment_Token_Amazon_Pay' ) ) { + $selected_payment_type = WC_Stripe_UPE_Payment_Method_Amazon_Pay::STRIPE_ID; } } else { $payment_method_id = sanitize_text_field( wp_unslash( $_POST['wc-stripe-payment-method'] ?? '' ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing @@ -2253,56 +2263,86 @@ protected function prepare_payment_information_from_request( WC_Order $order ) { 'return_url' => $this->get_return_url_for_redirect( $order, $save_payment_method_to_store ), 'use_stripe_sdk' => 'true', // We want to use the SDK to handle next actions via the client payment elements. See https://docs.stripe.com/api/setup_intents/create#create_setup_intent-use_stripe_sdk 'has_subscription' => $this->has_subscription( $order->get_id() ), - 'payment_method' => '', + 'payment_method' => $payment_method_id, 'payment_method_details' => $payment_method_details, 'payment_type' => 'single', // single | recurring. + 'save_payment_method_to_store' => $save_payment_method_to_store, + 'capture_method' => $capture_method, ]; if ( WC_Stripe_Payment_Methods::ACH === $selected_payment_type ) { WC_Stripe_API::attach_payment_method_to_customer( $payment_information['customer'], $payment_method_id ); } - if ( ! empty( $payment_method_id ) ) { - $payment_information['payment_method'] = $payment_method_id; - $payment_information['save_payment_method_to_store'] = $save_payment_method_to_store; - $payment_information['payment_method_options'] = $this->get_payment_method_options( + // Use the dynamic + short statement descriptor if enabled and it's a card payment. + $is_short_statement_descriptor_enabled = 'yes' === $this->get_option( 'is_short_statement_descriptor_enabled', 'no' ); + if ( WC_Stripe_Payment_Methods::CARD === $selected_payment_type && $is_short_statement_descriptor_enabled ) { + $payment_information['statement_descriptor_suffix'] = WC_Stripe_Helper::get_dynamic_statement_descriptor_suffix( $order ); + } + + if ( empty( $payment_method_id ) && ! empty( $_POST['wc-stripe-confirmation-token'] ) ) { + // Add fields that are only set when using the confirmation token flow. + $payment_information = $this->prepare_payment_information_for_confirmation_token( + $payment_information, $selected_payment_type, - $order, - $payment_method_details + $capture_method, ); - $payment_information['capture_method'] = $capture_method; } else { - $confirmation_token_id = sanitize_text_field( wp_unslash( $_POST['wc-stripe-confirmation-token'] ?? '' ) ); - $payment_information['confirmation_token'] = $confirmation_token_id; - $payment_information['save_payment_method_to_store'] = false; - - // When using confirmation tokens with manual capture, we need to - // set the capture_method parameter under payment method options. - if ( 'manual' === $capture_method ) { - $payment_information['payment_method_options'] = [ - $selected_payment_type => [ - 'capture_method' => 'manual', - ], - ]; - } else { - $payment_information['capture_method'] = $capture_method; - } + // Add fields that are only set when using the payment method flow. + $payment_information = $this->prepare_payment_information_for_payment_method( $payment_information, $selected_payment_type, $order ); + } - // When using confirmation tokens for subscriptions, we need to set the setup_future_usage parameter under payment method options. - if ( $payment_information['has_subscription'] ) { - $payment_information['payment_method_options'][ $selected_payment_type ]['setup_future_usage'] = 'off_session'; - } + return $payment_information; + } + + /** + * Add or remove payment information fields for the confirmation token flow. + * + * @param array $payment_information The base payment information. + * @param string $selected_payment_type The selected payment type. + * @param string $capture_method The capture method to be used. + * @return array The customized payment information for the confirmation token flow. + */ + private function prepare_payment_information_for_confirmation_token( $payment_information, $selected_payment_type, $capture_method ) { + // These fields should not be set when using confirmation tokens to create a payment intent. + unset( $payment_information['payment_method'] ); + unset( $payment_information['payment_method_details'] ); + + $confirmation_token_id = sanitize_text_field( wp_unslash( $_POST['wc-stripe-confirmation-token'] ?? '' ) ); + $payment_information['confirmation_token'] = $confirmation_token_id; + + // Some payment methods such as Amazon Pay will only accept a capture_method of 'manual' + // under payment_method_options instead of at the top level. + if ( 'manual' === $capture_method ) { + unset( $payment_information['capture_method'] ); + $payment_information['payment_method_options'][ $selected_payment_type ]['capture_method'] = 'manual'; } - // Use the dynamic + short statement descriptor if enabled and it's a card payment. - $is_short_statement_descriptor_enabled = 'yes' === $this->get_option( 'is_short_statement_descriptor_enabled', 'no' ); - if ( WC_Stripe_Payment_Methods::CARD === $selected_payment_type && $is_short_statement_descriptor_enabled ) { - $payment_information['statement_descriptor_suffix'] = WC_Stripe_Helper::get_dynamic_statement_descriptor_suffix( $order ); + if ( $payment_information['has_subscription'] ) { + $payment_information['payment_method_options'][ $selected_payment_type ]['setup_future_usage'] = 'off_session'; } return $payment_information; } + /** + * Add or remove payment information fields for the payment method flow. + * + * @param array $payment_information The base payment information. + * @param string $selected_payment_type The selected payment type. + * @param WC_Order $order The WC Order being processed. + * @return array The customized payment information for the payment method flow. + */ + private function prepare_payment_information_for_payment_method( $payment_information, $selected_payment_type, $order ) { + $payment_information['payment_method_options'] = $this->get_payment_method_options( + $selected_payment_type, + $order, + $payment_information['payment_method_details'] + ); + + return $payment_information; + } + /** * Returns the payment method options for the selected payment type. * diff --git a/includes/payment-methods/class-wc-stripe-upe-payment-method-amazon-pay.php b/includes/payment-methods/class-wc-stripe-upe-payment-method-amazon-pay.php index c00e5fda5..7376a627f 100644 --- a/includes/payment-methods/class-wc-stripe-upe-payment-method-amazon-pay.php +++ b/includes/payment-methods/class-wc-stripe-upe-payment-method-amazon-pay.php @@ -7,6 +7,7 @@ * Amazon Pay Payment Method class extending UPE base class */ class WC_Stripe_UPE_Payment_Method_Amazon_Pay extends WC_Stripe_UPE_Payment_Method { + use WC_Stripe_Subscriptions_Trait; const STRIPE_ID = WC_Stripe_Payment_Methods::AMAZON_PAY; @@ -24,6 +25,36 @@ public function __construct() { 'Amazon Pay is a payment method that allows customers to pay with their Amazon account.', 'woocommerce-gateway-stripe' ); + $this->supports[] = 'tokenization'; + + // Check if subscriptions are enabled and add support for them. + $this->maybe_init_subscriptions(); + } + + /** + * Returns string representing payment method type + * to query to retrieve saved payment methods from Stripe. + */ + public function get_retrievable_type() { + return $this->get_id(); + } + + /** + * Create new WC payment token and add to user. + * + * @param int $user_id WP_User ID + * @param object $payment_method Stripe payment method object + * + * @return WC_Payment_Token_Amazon_Pay + */ + public function create_payment_token_for_user( $user_id, $payment_method ) { + $token = new WC_Payment_Token_Amazon_Pay(); + $token->set_email( $payment_method->billing_details->email ?? '' ); + $token->set_gateway_id( WC_Stripe_Payment_Tokens::UPE_REUSABLE_GATEWAYS_BY_PAYMENT_METHOD[ self::STRIPE_ID ] ); + $token->set_token( $payment_method->id ); + $token->set_user_id( $user_id ); + $token->save(); + return $token; } /** diff --git a/includes/payment-tokens/class-wc-stripe-amazon-pay-payment-token.php b/includes/payment-tokens/class-wc-stripe-amazon-pay-payment-token.php new file mode 100644 index 000000000..ca3d91c0e --- /dev/null +++ b/includes/payment-tokens/class-wc-stripe-amazon-pay-payment-token.php @@ -0,0 +1,89 @@ + '', + ]; + + /** + * Get type to display to user. + * + * @param string $deprecated Deprecated since WooCommerce 3.0 + * @return string + */ + public function get_display_name( $deprecated = '' ) { + $display = sprintf( + /* translators: customer email */ + __( 'Amazon Pay (%s)', 'woocommerce-gateway-stripe' ), + $this->get_email() + ); + + return $display; + } + + /** + * Hook prefix + */ + protected function get_hook_prefix() { + return 'woocommerce_payment_token_amazon_pay_get_'; + } + + /** + * Returns the customer email. + * + * @param string $context What the value is for. Valid values are view and edit. + * + * @return string Customer email. + */ + public function get_email( $context = 'view' ) { + return $this->get_prop( 'email', $context ); + } + + /** + * Set the customer email. + * + * @param string $email Customer email. + */ + public function set_email( $email ) { + $this->set_prop( 'email', $email ); + } + + /** + * Checks if the payment method token is equal a provided payment method. + * + * @inheritDoc + */ + public function is_equal_payment_method( $payment_method ): bool { + if ( WC_Stripe_Payment_Methods::AMAZON_PAY === $payment_method->type + && ( $payment_method->billing_details->email ?? null ) === $this->get_email() ) { + return true; + } + + return false; + } +} diff --git a/includes/payment-tokens/class-wc-stripe-payment-tokens.php b/includes/payment-tokens/class-wc-stripe-payment-tokens.php index ff2d58523..627d02f17 100644 --- a/includes/payment-tokens/class-wc-stripe-payment-tokens.php +++ b/includes/payment-tokens/class-wc-stripe-payment-tokens.php @@ -23,6 +23,7 @@ class WC_Stripe_Payment_Tokens { const UPE_REUSABLE_GATEWAYS_BY_PAYMENT_METHOD = [ WC_Stripe_UPE_Payment_Method_CC::STRIPE_ID => WC_Stripe_UPE_Payment_Gateway::ID, WC_Stripe_UPE_Payment_Method_Link::STRIPE_ID => WC_Stripe_UPE_Payment_Gateway::ID, + WC_Stripe_UPE_Payment_Method_Amazon_Pay::STRIPE_ID => WC_Stripe_UPE_Payment_Gateway::ID, WC_Stripe_UPE_Payment_Method_ACH::STRIPE_ID => WC_Stripe_UPE_Payment_Gateway::ID . '_' . WC_Stripe_UPE_Payment_Method_ACH::STRIPE_ID, WC_Stripe_UPE_Payment_Method_Bancontact::STRIPE_ID => WC_Stripe_UPE_Payment_Gateway::ID . '_' . WC_Stripe_UPE_Payment_Method_Bancontact::STRIPE_ID, WC_Stripe_UPE_Payment_Method_Ideal::STRIPE_ID => WC_Stripe_UPE_Payment_Gateway::ID . '_' . WC_Stripe_UPE_Payment_Method_Ideal::STRIPE_ID, @@ -431,6 +432,13 @@ public function get_account_saved_payment_methods_list_item( $item, $payment_tok esc_html( $payment_token->get_email() ) ); break; + case WC_Stripe_Payment_Methods::AMAZON_PAY: + $item['method']['brand'] = sprintf( + /* translators: customer email */ + esc_html__( 'Amazon Pay (%s)', 'woocommerce-gateway-stripe' ), + esc_html( $payment_token->get_email() ) + ); + break; } return $item; @@ -555,6 +563,10 @@ private function add_token_to_user( $payment_method, WC_Stripe_Customer $custome $token->set_email( $payment_method->link->email ); $token->set_payment_method_type( $payment_method_type ); break; + case WC_Stripe_UPE_Payment_Method_Amazon_Pay::STRIPE_ID: + $token = new WC_Payment_Token_Amazon_Pay(); + $token->set_email( $payment_method->billing_details->email ?? '' ); + break; case WC_Stripe_UPE_Payment_Method_ACH::STRIPE_ID: $token = new WC_Payment_Token_ACH(); if ( isset( $payment_method->us_bank_account->last4 ) ) { @@ -643,6 +655,7 @@ public static function get_token_label_overrides_for_checkout() { WC_Stripe_UPE_Payment_Method_Cash_App_Pay::STRIPE_ID, WC_Stripe_UPE_Payment_Method_Link::STRIPE_ID, WC_Stripe_UPE_Payment_Method_Bacs_Debit::STRIPE_ID, + WC_Stripe_UPE_Payment_Method_Amazon_Pay::STRIPE_ID, ]; foreach ( $payment_method_types as $stripe_id ) { diff --git a/readme.txt b/readme.txt index 3c81f90c9..485ca2ef5 100644 --- a/readme.txt +++ b/readme.txt @@ -137,5 +137,6 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o * Add - Disable unsupported payment methods in Stripe settings * Update - Update handling of PR as a country in the terminal locations endpoint. * Fix - Hide Amazon Pay in settings when legacy checkout is enabled. +* Fix - Fix subscription renewal issues for Amazon Pay. [See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt). diff --git a/tests/phpunit/payment-methods/test-class-wc-stripe-upe-payment-method.php b/tests/phpunit/payment-methods/test-class-wc-stripe-upe-payment-method.php index 51b22f3f5..bcfae315a 100644 --- a/tests/phpunit/payment-methods/test-class-wc-stripe-upe-payment-method.php +++ b/tests/phpunit/payment-methods/test-class-wc-stripe-upe-payment-method.php @@ -38,6 +38,17 @@ class WC_Stripe_UPE_Payment_Method_Test extends WP_UnitTestCase { ], ]; + /** + * Base template for Stripe Amazon Pay payment method. + */ + const MOCK_AMAZON_PAY_PAYMENT_METHOD_TEMPLATE = [ + 'id' => 'pm_mock_payment_method_id', + 'type' => 'amazon_pay', + 'billing_details' => [ + 'email' => 'test@test.com', + ], + ]; + /** * Base template for Stripe ACH payment method. */ @@ -787,6 +798,12 @@ public function test_create_payment_token_for_user() { $this->assertTrue( WC_Payment_Token_Link::class === get_class( $token ) ); $this->assertSame( $token->get_email(), $link_payment_method_mock->link->email ); break; + case WC_Stripe_UPE_Payment_Method_Amazon_Pay::STRIPE_ID: + $amazon_payment_method_mock = $this->array_to_object( self::MOCK_AMAZON_PAY_PAYMENT_METHOD_TEMPLATE ); + $token = $payment_method->create_payment_token_for_user( $user_id, $amazon_payment_method_mock ); + $this->assertTrue( WC_Payment_Token_Amazon_Pay::class === get_class( $token ) ); + $this->assertSame( $token->get_email(), $amazon_payment_method_mock->billing_details->email ); + break; case WC_Stripe_UPE_Payment_Method_Cash_App_Pay::STRIPE_ID: $cash_app_payment_method_mock = $this->array_to_object( self::MOCK_CASH_APP_PAYMENT_METHOD_TEMPLATE ); $token = $payment_method->create_payment_token_for_user( $user_id, $cash_app_payment_method_mock ); diff --git a/tests/phpunit/payment-tokens/test-class-wc-stripe-amazon-pay-payment-token.php b/tests/phpunit/payment-tokens/test-class-wc-stripe-amazon-pay-payment-token.php new file mode 100644 index 000000000..f33256678 --- /dev/null +++ b/tests/phpunit/payment-tokens/test-class-wc-stripe-amazon-pay-payment-token.php @@ -0,0 +1,98 @@ +token = new WC_Payment_Token_Amazon_Pay(); + $this->token->set_email( 'john.doe@example.com' ); + } + + /** + * Test that the token type is correctly set as amazon_pay. + */ + public function test_token_type_is_amazon_pay() { + $this->assertEquals( + WC_Stripe_Payment_Methods::AMAZON_PAY, + $this->token->get_type(), + 'The token "type" property should match amazon_pay.' + ); + } + + /** + * Test setting and retrieving the email property. + */ + public function test_set_and_get_email() { + $this->token->set_email( 'john.doe@example.com' ); + $this->assertEquals( + 'john.doe@example.com', + $this->token->get_email(), + 'The email property should match the value that was set.' + ); + } + + /** + * Test is_equal_payment_method() returns true when type and email match. + */ + public function test_is_equal_payment_method_returns_true_on_valid_object() { + $payment_method_mock = (object) [ + 'type' => WC_Stripe_Payment_Methods::AMAZON_PAY, + 'billing_details' => (object) [ + 'email' => 'john.doe@example.com', + ], + ]; + + $this->assertTrue( + $this->token->is_equal_payment_method( $payment_method_mock ), + 'is_equal_payment_method() should return true when type and email match.' + ); + } + + /** + * Test is_equal_payment_method() returns false for a mismatched type. + */ + public function test_is_equal_payment_method_returns_false_mismatched_type() { + $payment_method_mock = (object) [ + 'type' => 'card', + 'billing_details' => (object) [ + 'email' => 'john.doe@example.com', + ], + ]; + + $this->assertFalse( + $this->token->is_equal_payment_method( $payment_method_mock ), + 'is_equal_payment_method() should return false when the type is not amazon_pay.' + ); + } + + /** + * Test is_equal_payment_method() returns false for a mismatched email. + */ + public function test_is_equal_payment_method_returns_false_mismatched_email() { + $payment_method_mock = (object) [ + 'type' => WC_Stripe_Payment_Methods::AMAZON_PAY, + 'billing_details' => (object) [ + 'email' => 'different_email@example.com', + ], + ]; + + $this->assertFalse( + $this->token->is_equal_payment_method( $payment_method_mock ), + 'is_equal_payment_method() should return false when the email does not match.' + ); + } +} diff --git a/tests/phpunit/payment-tokens/test-interface-wc-stripe-token-comparison.php b/tests/phpunit/payment-tokens/test-interface-wc-stripe-token-comparison.php index 6cdb02aae..1b691f2ae 100644 --- a/tests/phpunit/payment-tokens/test-interface-wc-stripe-token-comparison.php +++ b/tests/phpunit/payment-tokens/test-interface-wc-stripe-token-comparison.php @@ -22,6 +22,10 @@ public function test_is_equal_payment_method( $token_type, $payment_method, $exp $token = new WC_Payment_Token_Link(); $token->set_email( 'john.doe@example.com' ); break; + case WC_Stripe_Payment_Methods::AMAZON_PAY: + $token = new WC_Payment_Token_Amazon_Pay(); + $token->set_email( 'john.doe@example.com' ); + break; case WC_Stripe_Payment_Methods::CASHAPP_PAY: $token = new WC_Payment_Token_CashApp(); $token->set_cashtag( '$test_cashtag' ); @@ -42,14 +46,14 @@ public function test_is_equal_payment_method( $token_type, $payment_method, $exp */ public function provide_test_is_equal_payment_method() { return [ - 'Unknown method' => [ + 'Unknown method' => [ 'token type' => 'unknown', 'payment method' => (object) [ 'type' => 'unknown', ], 'expected' => false, ], - 'CC, not equal' => [ + 'CC, not equal' => [ 'token type' => 'CC', 'payment_method' => (object) [ 'type' => WC_Stripe_Payment_Methods::CARD, @@ -59,7 +63,7 @@ public function provide_test_is_equal_payment_method() { ], 'expected' => false, ], - 'CC, equal' => [ + 'CC, equal' => [ 'token type' => 'CC', 'payment method' => (object) [ 'type' => WC_Stripe_Payment_Methods::CARD, @@ -69,7 +73,7 @@ public function provide_test_is_equal_payment_method() { ], 'expected' => true, ], - 'SEPA, equal' => [ + 'SEPA, equal' => [ 'token type' => WC_Stripe_Payment_Methods::SEPA, 'payment method' => (object) [ 'type' => WC_Stripe_Payment_Methods::SEPA_DEBIT, @@ -79,7 +83,7 @@ public function provide_test_is_equal_payment_method() { ], 'expected' => true, ], - 'Link, equal' => [ + 'Link, equal' => [ 'token type' => WC_Stripe_Payment_Methods::LINK, 'payment method' => (object) [ 'type' => WC_Stripe_Payment_Methods::LINK, @@ -89,7 +93,17 @@ public function provide_test_is_equal_payment_method() { ], 'expected' => true, ], - 'CashApp, equal' => [ + 'Amazon Pay, equal' => [ + 'token type' => WC_Stripe_Payment_Methods::AMAZON_PAY, + 'payment method' => (object) [ + 'type' => WC_Stripe_Payment_Methods::AMAZON_PAY, + 'billing_details' => (object) [ + 'email' => 'john.doe@example.com', + ], + ], + 'expected' => true, + ], + 'CashApp, equal' => [ 'token type' => WC_Stripe_Payment_Methods::CASHAPP_PAY, 'payment method' => (object) [ 'type' => WC_Stripe_Payment_Methods::CASHAPP_PAY, diff --git a/woocommerce-gateway-stripe.php b/woocommerce-gateway-stripe.php index cfab61197..94a534e27 100644 --- a/woocommerce-gateway-stripe.php +++ b/woocommerce-gateway-stripe.php @@ -219,6 +219,7 @@ public function init() { require_once __DIR__ . '/includes/payment-tokens/class-wc-stripe-link-payment-token.php'; require_once __DIR__ . '/includes/payment-tokens/class-wc-stripe-cash-app-payment-token.php'; require_once __DIR__ . '/includes/payment-tokens/class-wc-stripe-bacs-payment-token.php'; + require_once __DIR__ . '/includes/payment-tokens/class-wc-stripe-amazon-pay-payment-token.php'; require_once __DIR__ . '/includes/class-wc-stripe-apple-pay-registration.php'; require_once __DIR__ . '/includes/class-wc-stripe-status.php'; require_once __DIR__ . '/includes/class-wc-gateway-stripe.php';