Version Description
- 2019-06-17 =
- Update - Add UGX (Ugandan Shilling) to zero decimal currency list.
- Fix - CSRF verification error upon creating account on checkout.
- Fix - Duplicate emails and order notes after successful transactions.
See changelog for all versions.
=
Download this release
Release Info
Developer | woothemes |
Plugin | WooCommerce Stripe Payment Gateway |
Version | 4.2.1 |
Comparing to | |
See all releases |
Code changes from version 4.2.0 to 4.2.1
- changelog.txt +5 -0
- includes/abstracts/abstract-wc-stripe-payment-gateway.php +40 -27
- includes/admin/class-wc-stripe-admin-notices.php +3 -3
- includes/class-wc-gateway-stripe.php +38 -15
- includes/class-wc-stripe-helper.php +10 -8
- includes/class-wc-stripe-order-handler.php +8 -4
- readme.txt +5 -7
- woocommerce-gateway-stripe.php +2 -2
changelog.txt
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
*** Changelog ***
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
= 4.2.0 - 2019-05-29 =
|
4 |
* Update - Enable Payment Request buttons for Puerto Rico based stores.
|
5 |
* Update - Add support for Strong Customer Authentication (SCA) for user-initiated payments.
|
1 |
*** Changelog ***
|
2 |
|
3 |
+
= 4.2.1 - 2019-06-17 =
|
4 |
+
* Update - Add UGX (Ugandan Shilling) to zero decimal currency list.
|
5 |
+
* Fix - CSRF verification error upon creating account on checkout.
|
6 |
+
* Fix - Duplicate emails and order notes after successful transactions.
|
7 |
+
|
8 |
= 4.2.0 - 2019-05-29 =
|
9 |
* Update - Enable Payment Request buttons for Puerto Rico based stores.
|
10 |
* Update - Add support for Strong Customer Authentication (SCA) for user-initiated payments.
|
includes/abstracts/abstract-wc-stripe-payment-gateway.php
CHANGED
@@ -1021,13 +1021,13 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
1021 |
}
|
1022 |
|
1023 |
/**
|
1024 |
-
* Create a new PaymentIntent
|
1025 |
*
|
1026 |
* @param WC_Order $order The order that is being paid for.
|
1027 |
* @param object $prepared_source The source that is used for the payment.
|
1028 |
-
* @return object An intent
|
1029 |
*/
|
1030 |
-
public function
|
1031 |
// The request for a charge contains metadata for the intent.
|
1032 |
$full_request = $this->generate_payment_request( $order, $prepared_source );
|
1033 |
|
@@ -1057,27 +1057,10 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
1057 |
$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->id : $order->get_id();
|
1058 |
WC_Stripe_Logger::log( "Stripe PaymentIntent $intent->id initiated for order $order_id" );
|
1059 |
|
1060 |
-
// Try to confirm the intent & capture the charge (if 3DS is not required).
|
1061 |
-
$confirm_request = array(
|
1062 |
-
'source' => $request['source'],
|
1063 |
-
);
|
1064 |
-
$confirmed_intent = WC_Stripe_API::request( $confirm_request, "payment_intents/$intent->id/confirm" );
|
1065 |
-
|
1066 |
-
if ( ! empty( $confirmed_intent->error ) ) {
|
1067 |
-
return $confirmed_intent;
|
1068 |
-
}
|
1069 |
-
|
1070 |
// Save the intent ID to the order.
|
1071 |
-
$this->save_intent_to_order( $order, $
|
1072 |
|
1073 |
-
|
1074 |
-
if ( 'succeeded' === $confirmed_intent->status ) {
|
1075 |
-
WC_Stripe_Logger::log( "Stripe PaymentIntent $intent->id succeeded for order $order_id" );
|
1076 |
-
} elseif ( 'requires_action' === $confirmed_intent->status ) {
|
1077 |
-
WC_Stripe_Logger::log( "Stripe PaymentIntent $intent->id requires authentication for order $order_id" );
|
1078 |
-
}
|
1079 |
-
|
1080 |
-
return $confirmed_intent;
|
1081 |
}
|
1082 |
|
1083 |
/**
|
@@ -1108,13 +1091,43 @@ abstract class WC_Stripe_Payment_Gateway extends WC_Payment_Gateway_CC {
|
|
1108 |
return $intent;
|
1109 |
}
|
1110 |
|
1111 |
-
|
|
|
1112 |
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1117 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1118 |
}
|
1119 |
|
1120 |
/**
|
1021 |
}
|
1022 |
|
1023 |
/**
|
1024 |
+
* Create a new PaymentIntent.
|
1025 |
*
|
1026 |
* @param WC_Order $order The order that is being paid for.
|
1027 |
* @param object $prepared_source The source that is used for the payment.
|
1028 |
+
* @return object An intent or an error.
|
1029 |
*/
|
1030 |
+
public function create_intent( $order, $prepared_source ) {
|
1031 |
// The request for a charge contains metadata for the intent.
|
1032 |
$full_request = $this->generate_payment_request( $order, $prepared_source );
|
1033 |
|
1057 |
$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->id : $order->get_id();
|
1058 |
WC_Stripe_Logger::log( "Stripe PaymentIntent $intent->id initiated for order $order_id" );
|
1059 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1060 |
// Save the intent ID to the order.
|
1061 |
+
$this->save_intent_to_order( $order, $intent );
|
1062 |
|
1063 |
+
return $intent;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1064 |
}
|
1065 |
|
1066 |
/**
|
1091 |
return $intent;
|
1092 |
}
|
1093 |
|
1094 |
+
return WC_Stripe_API::request( $request, "payment_intents/$intent->id" );
|
1095 |
+
}
|
1096 |
|
1097 |
+
/**
|
1098 |
+
* Confirms an intent if it is the `requires_confirmation` state.
|
1099 |
+
*
|
1100 |
+
* @since 4.2.1
|
1101 |
+
* @param object $intent The intent to confirm.
|
1102 |
+
* @param WC_Order $order The order that the intent is associated with.
|
1103 |
+
* @param object $prepared_source The source that is being charged.
|
1104 |
+
* @return object Either an error or the updated intent.
|
1105 |
+
*/
|
1106 |
+
public function confirm_intent( $intent, $order, $prepared_source ) {
|
1107 |
+
if ( 'requires_confirmation' !== $intent->status ) {
|
1108 |
+
return $intent;
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
// Try to confirm the intent & capture the charge (if 3DS is not required).
|
1112 |
+
$confirm_request = array(
|
1113 |
+
'source' => $prepared_source->source,
|
1114 |
+
);
|
1115 |
+
|
1116 |
+
$confirmed_intent = WC_Stripe_API::request( $confirm_request, "payment_intents/$intent->id/confirm" );
|
1117 |
+
|
1118 |
+
if ( ! empty( $confirmed_intent->error ) ) {
|
1119 |
+
return $confirmed_intent;
|
1120 |
}
|
1121 |
+
|
1122 |
+
// Save a note about the status of the intent.
|
1123 |
+
$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->id : $order->get_id();
|
1124 |
+
if ( 'succeeded' === $confirmed_intent->status ) {
|
1125 |
+
WC_Stripe_Logger::log( "Stripe PaymentIntent $intent->id succeeded for order $order_id" );
|
1126 |
+
} elseif ( 'requires_action' === $confirmed_intent->status ) {
|
1127 |
+
WC_Stripe_Logger::log( "Stripe PaymentIntent $intent->id requires authentication for order $order_id" );
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
return $confirmed_intent;
|
1131 |
}
|
1132 |
|
1133 |
/**
|
includes/admin/class-wc-stripe-admin-notices.php
CHANGED
@@ -66,7 +66,7 @@ class WC_Stripe_Admin_Notices {
|
|
66 |
}
|
67 |
|
68 |
echo '<p>';
|
69 |
-
echo wp_kses( $notice['message'], array( 'a' => array( 'href' => array() ) ) );
|
70 |
echo '</p></div>';
|
71 |
}
|
72 |
}
|
@@ -116,10 +116,10 @@ class WC_Stripe_Admin_Notices {
|
|
116 |
|
117 |
if ( isset( $options['enabled'] ) && 'yes' === $options['enabled'] ) {
|
118 |
if ( empty( $show_3ds_notice ) && $three_d_secure ) {
|
119 |
-
$url = 'https://stripe.com/docs/payments/
|
120 |
|
121 |
/* translators: 1) A URL that explains Stripe Radar. */
|
122 |
-
$message = __( 'WooCommerce Stripe - We see that you had the "Require 3D secure when applicable" setting turned on. This setting is not available here anymore, because it is now replaced by Stripe Radar. You can learn more about it <a href="%s">here</a>.', 'woocommerce-gateway-stripe' );
|
123 |
|
124 |
$this->add_admin_notice( '3ds', 'notice notice-warning', sprintf( $message, $url ), true );
|
125 |
}
|
66 |
}
|
67 |
|
68 |
echo '<p>';
|
69 |
+
echo wp_kses( $notice['message'], array( 'a' => array( 'href' => array(), 'target' => array() ) ) );
|
70 |
echo '</p></div>';
|
71 |
}
|
72 |
}
|
116 |
|
117 |
if ( isset( $options['enabled'] ) && 'yes' === $options['enabled'] ) {
|
118 |
if ( empty( $show_3ds_notice ) && $three_d_secure ) {
|
119 |
+
$url = 'https://stripe.com/docs/payments/3d-secure#three-ds-radar';
|
120 |
|
121 |
/* translators: 1) A URL that explains Stripe Radar. */
|
122 |
+
$message = __( 'WooCommerce Stripe - We see that you had the "Require 3D secure when applicable" setting turned on. This setting is not available here anymore, because it is now replaced by Stripe Radar. You can learn more about it <a href="%s" target="_blank">here</a>.', 'woocommerce-gateway-stripe' );
|
123 |
|
124 |
$this->add_admin_notice( '3ds', 'notice notice-warning', sprintf( $message, $url ), true );
|
125 |
}
|
includes/class-wc-gateway-stripe.php
CHANGED
@@ -138,6 +138,7 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
138 |
add_filter( 'woocommerce_available_payment_gateways', array( $this, 'prepare_order_pay_page' ) );
|
139 |
add_action( 'woocommerce_account_view-order_endpoint', array( $this, 'check_intent_status_on_order_page' ), 1 );
|
140 |
add_filter( 'woocommerce_payment_successful_result', array( $this, 'modify_successful_payment_result' ), 99999, 2 );
|
|
|
141 |
|
142 |
if ( WC_Stripe_Helper::is_pre_orders_exists() ) {
|
143 |
$this->pre_orders = new WC_Stripe_Pre_Orders_Compat();
|
@@ -613,19 +614,25 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
613 |
if ( $intent ) {
|
614 |
$intent = $this->update_existing_intent( $intent, $order, $prepared_source );
|
615 |
} else {
|
616 |
-
$intent
|
617 |
-
$response = $intent;
|
618 |
}
|
619 |
|
620 |
-
|
621 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
|
623 |
// We want to retry.
|
624 |
-
if ( $this->is_retryable_error( $
|
625 |
-
return $this->retry_after_error( $
|
626 |
}
|
627 |
|
628 |
-
$this->
|
|
|
629 |
}
|
630 |
|
631 |
if ( ! empty( $intent ) ) {
|
@@ -634,6 +641,8 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
634 |
|
635 |
// If the intent requires a 3DS flow, redirect to it.
|
636 |
if ( 'requires_action' === $intent->status ) {
|
|
|
|
|
637 |
if ( is_wc_endpoint_url( 'order-pay' ) ) {
|
638 |
$redirect_url = add_query_arg( 'wc-stripe-confirmation', 1, $order->get_checkout_payment_url( false ) );
|
639 |
|
@@ -649,9 +658,9 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
649 |
*/
|
650 |
|
651 |
return array(
|
652 |
-
'result'
|
653 |
-
'redirect'
|
654 |
-
'intent_secret'
|
655 |
);
|
656 |
}
|
657 |
}
|
@@ -663,6 +672,9 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
663 |
// Remove cart.
|
664 |
WC()->cart->empty_cart();
|
665 |
|
|
|
|
|
|
|
666 |
// Return thank you page redirect.
|
667 |
return array(
|
668 |
'result' => 'success',
|
@@ -933,6 +945,13 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
933 |
);
|
934 |
}
|
935 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
936 |
/**
|
937 |
* Executed between the "Checkout" and "Thank you" pages, this
|
938 |
* method updates orders based on the status of associated PaymentIntents.
|
@@ -941,11 +960,6 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
941 |
* @param WC_Order $order The order which is in a transitional state.
|
942 |
*/
|
943 |
public function verify_intent_after_checkout( $order ) {
|
944 |
-
if ( 'pending' !== $order->get_status() && 'failed' !== $order->get_status() ) {
|
945 |
-
// If payment has already been completed, this function is redundant.
|
946 |
-
return;
|
947 |
-
}
|
948 |
-
|
949 |
$payment_method = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->payment_method : $order->get_payment_method();
|
950 |
if ( $payment_method !== $this->id ) {
|
951 |
// If this is not the payment method, an intent would not be available.
|
@@ -958,6 +972,15 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
|
|
958 |
return;
|
959 |
}
|
960 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
961 |
if ( $this->lock_order_payment( $order, $intent ) ) {
|
962 |
return;
|
963 |
}
|
138 |
add_filter( 'woocommerce_available_payment_gateways', array( $this, 'prepare_order_pay_page' ) );
|
139 |
add_action( 'woocommerce_account_view-order_endpoint', array( $this, 'check_intent_status_on_order_page' ), 1 );
|
140 |
add_filter( 'woocommerce_payment_successful_result', array( $this, 'modify_successful_payment_result' ), 99999, 2 );
|
141 |
+
add_action( 'set_logged_in_cookie', array( $this, 'set_cookie_on_current_request' ) );
|
142 |
|
143 |
if ( WC_Stripe_Helper::is_pre_orders_exists() ) {
|
144 |
$this->pre_orders = new WC_Stripe_Pre_Orders_Compat();
|
614 |
if ( $intent ) {
|
615 |
$intent = $this->update_existing_intent( $intent, $order, $prepared_source );
|
616 |
} else {
|
617 |
+
$intent = $this->create_intent( $order, $prepared_source );
|
|
|
618 |
}
|
619 |
|
620 |
+
// Confirm the intent after locking the order to make sure webhooks will not interfere.
|
621 |
+
if ( empty( $intent->error ) ) {
|
622 |
+
$this->lock_order_payment( $order, $intent );
|
623 |
+
$intent = $this->confirm_intent( $intent, $order, $prepared_source );
|
624 |
+
}
|
625 |
+
|
626 |
+
if ( ! empty( $intent->error ) ) {
|
627 |
+
$this->maybe_remove_non_existent_customer( $intent->error, $order );
|
628 |
|
629 |
// We want to retry.
|
630 |
+
if ( $this->is_retryable_error( $intent->error ) ) {
|
631 |
+
return $this->retry_after_error( $intent, $order, $retry, $force_save_source, $previous_error );
|
632 |
}
|
633 |
|
634 |
+
$this->unlock_order_payment( $order );
|
635 |
+
$this->throw_localized_message( $intent, $order );
|
636 |
}
|
637 |
|
638 |
if ( ! empty( $intent ) ) {
|
641 |
|
642 |
// If the intent requires a 3DS flow, redirect to it.
|
643 |
if ( 'requires_action' === $intent->status ) {
|
644 |
+
$this->unlock_order_payment( $order );
|
645 |
+
|
646 |
if ( is_wc_endpoint_url( 'order-pay' ) ) {
|
647 |
$redirect_url = add_query_arg( 'wc-stripe-confirmation', 1, $order->get_checkout_payment_url( false ) );
|
648 |
|
658 |
*/
|
659 |
|
660 |
return array(
|
661 |
+
'result' => 'success',
|
662 |
+
'redirect' => $this->get_return_url( $order ),
|
663 |
+
'intent_secret' => $intent->client_secret,
|
664 |
);
|
665 |
}
|
666 |
}
|
672 |
// Remove cart.
|
673 |
WC()->cart->empty_cart();
|
674 |
|
675 |
+
// Unlock the order.
|
676 |
+
$this->unlock_order_payment( $order );
|
677 |
+
|
678 |
// Return thank you page redirect.
|
679 |
return array(
|
680 |
'result' => 'success',
|
945 |
);
|
946 |
}
|
947 |
|
948 |
+
/**
|
949 |
+
* Proceed with current request using new login session (to ensure consistent nonce).
|
950 |
+
*/
|
951 |
+
public function set_cookie_on_current_request( $cookie ) {
|
952 |
+
$_COOKIE[ LOGGED_IN_COOKIE ] = $cookie;
|
953 |
+
}
|
954 |
+
|
955 |
/**
|
956 |
* Executed between the "Checkout" and "Thank you" pages, this
|
957 |
* method updates orders based on the status of associated PaymentIntents.
|
960 |
* @param WC_Order $order The order which is in a transitional state.
|
961 |
*/
|
962 |
public function verify_intent_after_checkout( $order ) {
|
|
|
|
|
|
|
|
|
|
|
963 |
$payment_method = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->payment_method : $order->get_payment_method();
|
964 |
if ( $payment_method !== $this->id ) {
|
965 |
// If this is not the payment method, an intent would not be available.
|
972 |
return;
|
973 |
}
|
974 |
|
975 |
+
// A webhook might have modified or locked the order while the intent was retreived. This ensures we are reading the right status.
|
976 |
+
clean_post_cache( $order->get_id() );
|
977 |
+
$order = wc_get_order( $order->get_id() );
|
978 |
+
|
979 |
+
if ( 'pending' !== $order->get_status() && 'failed' !== $order->get_status() ) {
|
980 |
+
// If payment has already been completed, this function is redundant.
|
981 |
+
return;
|
982 |
+
}
|
983 |
+
|
984 |
if ( $this->lock_order_payment( $order, $intent ) ) {
|
985 |
return;
|
986 |
}
|
includes/class-wc-stripe-helper.php
CHANGED
@@ -228,27 +228,29 @@ class WC_Stripe_Helper {
|
|
228 |
}
|
229 |
|
230 |
/**
|
231 |
-
* List of currencies supported by Stripe that has no decimals
|
|
|
232 |
*
|
233 |
* @return array $currencies
|
234 |
*/
|
235 |
public static function no_decimal_currencies() {
|
236 |
return array(
|
237 |
'bif', // Burundian Franc
|
238 |
-
'djf', // Djiboutian Franc
|
239 |
-
'jpy', // Japanese Yen
|
240 |
-
'krw', // South Korean Won
|
241 |
-
'pyg', // Paraguayan Guaraní
|
242 |
-
'vnd', // Vietnamese Đồng
|
243 |
-
'xaf', // Central African Cfa Franc
|
244 |
-
'xpf', // Cfp Franc
|
245 |
'clp', // Chilean Peso
|
|
|
246 |
'gnf', // Guinean Franc
|
|
|
247 |
'kmf', // Comorian Franc
|
|
|
248 |
'mga', // Malagasy Ariary
|
|
|
249 |
'rwf', // Rwandan Franc
|
|
|
|
|
250 |
'vuv', // Vanuatu Vatu
|
|
|
251 |
'xof', // West African Cfa Franc
|
|
|
252 |
);
|
253 |
}
|
254 |
|
228 |
}
|
229 |
|
230 |
/**
|
231 |
+
* List of currencies supported by Stripe that has no decimals
|
232 |
+
* https://stripe.com/docs/currencies#zero-decimal from https://stripe.com/docs/currencies#presentment-currencies
|
233 |
*
|
234 |
* @return array $currencies
|
235 |
*/
|
236 |
public static function no_decimal_currencies() {
|
237 |
return array(
|
238 |
'bif', // Burundian Franc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
'clp', // Chilean Peso
|
240 |
+
'djf', // Djiboutian Franc
|
241 |
'gnf', // Guinean Franc
|
242 |
+
'jpy', // Japanese Yen
|
243 |
'kmf', // Comorian Franc
|
244 |
+
'krw', // South Korean Won
|
245 |
'mga', // Malagasy Ariary
|
246 |
+
'pyg', // Paraguayan Guaraní
|
247 |
'rwf', // Rwandan Franc
|
248 |
+
'ugx', // Ugandan Shilling
|
249 |
+
'vnd', // Vietnamese Đồng
|
250 |
'vuv', // Vanuatu Vatu
|
251 |
+
'xaf', // Central African Cfa Franc
|
252 |
'xof', // West African Cfa Franc
|
253 |
+
'xpf', // Cfp Franc
|
254 |
);
|
255 |
}
|
256 |
|
includes/class-wc-stripe-order-handler.php
CHANGED
@@ -24,10 +24,10 @@ class WC_Stripe_Order_Handler extends WC_Stripe_Payment_Gateway {
|
|
24 |
$this->retry_interval = 1;
|
25 |
|
26 |
add_action( 'wp', array( $this, 'maybe_process_redirect_order' ) );
|
27 |
-
add_action( '
|
28 |
-
add_action( '
|
29 |
-
add_action( '
|
30 |
-
add_action( '
|
31 |
}
|
32 |
|
33 |
/**
|
@@ -299,6 +299,10 @@ class WC_Stripe_Order_Handler extends WC_Stripe_Payment_Gateway {
|
|
299 |
// Store other data such as fees
|
300 |
WC_Stripe_Helper::is_wc_lt( '3.0' ) ? update_post_meta( $order_id, '_transaction_id', $result->id ) : $order->set_transaction_id( $result->id );
|
301 |
|
|
|
|
|
|
|
|
|
302 |
$this->update_fees( $order, $result->balance_transaction->id );
|
303 |
}
|
304 |
|
24 |
$this->retry_interval = 1;
|
25 |
|
26 |
add_action( 'wp', array( $this, 'maybe_process_redirect_order' ) );
|
27 |
+
add_action( 'woocommerce_order_status_processing', array( $this, 'capture_payment' ) );
|
28 |
+
add_action( 'woocommerce_order_status_completed', array( $this, 'capture_payment' ) );
|
29 |
+
add_action( 'woocommerce_order_status_cancelled', array( $this, 'cancel_payment' ) );
|
30 |
+
add_action( 'woocommerce_order_status_refunded', array( $this, 'cancel_payment' ) );
|
31 |
}
|
32 |
|
33 |
/**
|
299 |
// Store other data such as fees
|
300 |
WC_Stripe_Helper::is_wc_lt( '3.0' ) ? update_post_meta( $order_id, '_transaction_id', $result->id ) : $order->set_transaction_id( $result->id );
|
301 |
|
302 |
+
if ( is_callable( array( $order, 'save' ) ) ) {
|
303 |
+
$order->save();
|
304 |
+
}
|
305 |
+
|
306 |
$this->update_fees( $order, $result->balance_transaction->id );
|
307 |
}
|
308 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: credit card, stripe, apple pay, payment request, google pay, sepa, sofort,
|
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 5.2.1
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 4.2.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
Attributions: thorsten-stripe
|
@@ -113,12 +113,10 @@ If you get stuck, you can ask for help in the Plugin Forum.
|
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
-
= 4.2.
|
117 |
-
* Update -
|
118 |
-
*
|
119 |
-
*
|
120 |
-
* Remove - 3D Secure settings are no longer available in the gateway settings. Use Stripe Radar instead.
|
121 |
-
* Fix - Display error messages only next to the chosen saved card.
|
122 |
|
123 |
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/master/changelog.txt).
|
124 |
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 5.2.1
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 4.2.1
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
Attributions: thorsten-stripe
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
+
= 4.2.1 - 2019-06-17 =
|
117 |
+
* Update - Add UGX (Ugandan Shilling) to zero decimal currency list.
|
118 |
+
* Fix - CSRF verification error upon creating account on checkout.
|
119 |
+
* Fix - Duplicate emails and order notes after successful transactions.
|
|
|
|
|
120 |
|
121 |
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/master/changelog.txt).
|
122 |
|
woocommerce-gateway-stripe.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Take credit card payments on your store using Stripe.
|
6 |
* Author: WooCommerce
|
7 |
* Author URI: https://woocommerce.com/
|
8 |
-
* Version: 4.2.
|
9 |
* Requires at least: 4.4
|
10 |
* Tested up to: 5.2.1
|
11 |
* WC requires at least: 2.6
|
@@ -46,7 +46,7 @@ function woocommerce_gateway_stripe_init() {
|
|
46 |
/**
|
47 |
* Required minimums and constants
|
48 |
*/
|
49 |
-
define( 'WC_STRIPE_VERSION', '4.2.
|
50 |
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
|
51 |
define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
|
52 |
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
|
5 |
* Description: Take credit card payments on your store using Stripe.
|
6 |
* Author: WooCommerce
|
7 |
* Author URI: https://woocommerce.com/
|
8 |
+
* Version: 4.2.1
|
9 |
* Requires at least: 4.4
|
10 |
* Tested up to: 5.2.1
|
11 |
* WC requires at least: 2.6
|
46 |
/**
|
47 |
* Required minimums and constants
|
48 |
*/
|
49 |
+
define( 'WC_STRIPE_VERSION', '4.2.1' );
|
50 |
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
|
51 |
define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
|
52 |
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
|