WooCommerce Stripe Payment Gateway - Version 4.2.3

Version Description

  • 2019-07-18 =
  • Fix - Ignore "payment failed" webhooks if they come after another payment has already succeeded for that order.
  • Fix - Correctly transition an order to "On Hold" if the payment was put under review by Stripe Radar, and back to "Processing" when the review is approved.
  • Tweak - Make the publishable key fields be plain text instead of "password".
  • Fix - Fix successful retries of 3ds failing.

See changelog for all versions.

=

Download this release

Release Info

Developer woothemes
Plugin Icon 128x128 WooCommerce Stripe Payment Gateway
Version 4.2.3
Comparing to
See all releases

Code changes from version 4.2.2 to 4.2.3

assets/js/stripe-admin.js CHANGED
@@ -24,19 +24,25 @@ jQuery( function( $ ) {
24
$( document.body ).on( 'change', '#woocommerce_stripe_testmode', function() {
25
var test_secret_key = $( '#woocommerce_stripe_test_secret_key' ).parents( 'tr' ).eq( 0 ),
26
test_publishable_key = $( '#woocommerce_stripe_test_publishable_key' ).parents( 'tr' ).eq( 0 ),
27
live_secret_key = $( '#woocommerce_stripe_secret_key' ).parents( 'tr' ).eq( 0 ),
28
- live_publishable_key = $( '#woocommerce_stripe_publishable_key' ).parents( 'tr' ).eq( 0 );
29
30
if ( $( this ).is( ':checked' ) ) {
31
test_secret_key.show();
32
test_publishable_key.show();
33
live_secret_key.hide();
34
live_publishable_key.hide();
35
} else {
36
test_secret_key.hide();
37
test_publishable_key.hide();
38
live_secret_key.show();
39
live_publishable_key.show();
40
}
41
} );
42
24
$( document.body ).on( 'change', '#woocommerce_stripe_testmode', function() {
25
var test_secret_key = $( '#woocommerce_stripe_test_secret_key' ).parents( 'tr' ).eq( 0 ),
26
test_publishable_key = $( '#woocommerce_stripe_test_publishable_key' ).parents( 'tr' ).eq( 0 ),
27
+ test_webhook_secret = $( '#woocommerce_stripe_test_webhook_secret' ).parents( 'tr' ).eq( 0 ),
28
live_secret_key = $( '#woocommerce_stripe_secret_key' ).parents( 'tr' ).eq( 0 ),
29
+ live_publishable_key = $( '#woocommerce_stripe_publishable_key' ).parents( 'tr' ).eq( 0 ),
30
+ live_webhook_secret = $( '#woocommerce_stripe_webhook_secret' ).parents( 'tr' ).eq( 0 );
31
32
if ( $( this ).is( ':checked' ) ) {
33
test_secret_key.show();
34
test_publishable_key.show();
35
+ test_webhook_secret.show();
36
live_secret_key.hide();
37
live_publishable_key.hide();
38
+ live_webhook_secret.hide();
39
} else {
40
test_secret_key.hide();
41
test_publishable_key.hide();
42
+ test_webhook_secret.hide();
43
live_secret_key.show();
44
live_publishable_key.show();
45
+ live_webhook_secret.show();
46
}
47
} );
48
assets/js/stripe-admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(c){"use strict";var e={isTestMode:function(){return c("#woocommerce_stripe_testmode").is(":checked")},getSecretKey:function(){return e.isTestMode()?c("#woocommerce_stripe_test_secret_key").val():c("#woocommerce_stripe_secret_key").val()},init:function(){c(document.body).on("change","#woocommerce_stripe_testmode",function(){var e=c("#woocommerce_stripe_test_secret_key").parents("tr").eq(0),t=c("#woocommerce_stripe_test_publishable_key").parents("tr").eq(0),o=c("#woocommerce_stripe_secret_key").parents("tr").eq(0),s=c("#woocommerce_stripe_publishable_key").parents("tr").eq(0);c(this).is(":checked")?(e.show(),t.show(),o.hide(),s.hide()):(e.hide(),t.hide(),o.show(),s.show())}),c("#woocommerce_stripe_testmode").change(),c("#woocommerce_stripe_payment_request").change(function(){c(this).is(":checked")?c("#woocommerce_stripe_payment_request_button_theme, #woocommerce_stripe_payment_request_button_type, #woocommerce_stripe_payment_request_button_height").closest("tr").show():c("#woocommerce_stripe_payment_request_button_theme, #woocommerce_stripe_payment_request_button_type, #woocommerce_stripe_payment_request_button_height").closest("tr").hide()}).change(),c(".wc-stripe-3ds-missing").each(function(){var e=c(this);e.find(".notice-dismiss").on("click.wc-stripe-dismiss-notice",function(){c.ajax({type:"head",url:window.location.href+"&stripe_dismiss_3ds="+e.data("nonce")})})})}};e.init()});
1
+ jQuery(function(_){"use strict";var e={isTestMode:function(){return _("#woocommerce_stripe_testmode").is(":checked")},getSecretKey:function(){return e.isTestMode()?_("#woocommerce_stripe_test_secret_key").val():_("#woocommerce_stripe_secret_key").val()},init:function(){_(document.body).on("change","#woocommerce_stripe_testmode",function(){var e=_("#woocommerce_stripe_test_secret_key").parents("tr").eq(0),t=_("#woocommerce_stripe_test_publishable_key").parents("tr").eq(0),o=_("#woocommerce_stripe_test_webhook_secret").parents("tr").eq(0),s=_("#woocommerce_stripe_secret_key").parents("tr").eq(0),r=_("#woocommerce_stripe_publishable_key").parents("tr").eq(0),c=_("#woocommerce_stripe_webhook_secret").parents("tr").eq(0);_(this).is(":checked")?(e.show(),t.show(),o.show(),s.hide(),r.hide(),c.hide()):(e.hide(),t.hide(),o.hide(),s.show(),r.show(),c.show())}),_("#woocommerce_stripe_testmode").change(),_("#woocommerce_stripe_payment_request").change(function(){_(this).is(":checked")?_("#woocommerce_stripe_payment_request_button_theme, #woocommerce_stripe_payment_request_button_type, #woocommerce_stripe_payment_request_button_height").closest("tr").show():_("#woocommerce_stripe_payment_request_button_theme, #woocommerce_stripe_payment_request_button_type, #woocommerce_stripe_payment_request_button_height").closest("tr").hide()}).change(),_(".wc-stripe-3ds-missing").each(function(){var e=_(this);e.find(".notice-dismiss").on("click.wc-stripe-dismiss-notice",function(){_.ajax({type:"head",url:window.location.href+"&stripe_dismiss_3ds="+e.data("nonce")})})})}};e.init()});
changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
*** Changelog ***
2
3
= 4.2.2 - 2019-06-26 =
4
* Fix - Changing an order status to "Cancelled" or "Refunded" will no longer refund the payment, will only void the payment if it was just authorized.
5
1
*** Changelog ***
2
3
+ = 4.2.3 - 2019-07-18 =
4
+ * Fix - Ignore "payment failed" webhooks if they come after another payment has already succeeded for that order.
5
+ * Fix - Correctly transition an order to "On Hold" if the payment was put under review by Stripe Radar, and back to "Processing" when the review is approved.
6
+ * Tweak - Make the publishable key fields be plain text instead of "password".
7
+ * Fix - Fix successful retries of 3ds failing.
8
+
9
= 4.2.2 - 2019-06-26 =
10
* Fix - Changing an order status to "Cancelled" or "Refunded" will no longer refund the payment, will only void the payment if it was just authorized.
11
includes/admin/stripe-settings.php CHANGED
@@ -43,7 +43,7 @@ return apply_filters(
43
),
44
'test_publishable_key' => array(
45
'title' => __( 'Test Publishable Key', 'woocommerce-gateway-stripe' ),
46
- 'type' => 'password',
47
'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
48
'default' => '',
49
'desc_tip' => true,
@@ -55,9 +55,16 @@ return apply_filters(
55
'default' => '',
56
'desc_tip' => true,
57
),
58
'publishable_key' => array(
59
'title' => __( 'Live Publishable Key', 'woocommerce-gateway-stripe' ),
60
- 'type' => 'password',
61
'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
62
'default' => '',
63
'desc_tip' => true,
@@ -69,6 +76,13 @@ return apply_filters(
69
'default' => '',
70
'desc_tip' => true,
71
),
72
'inline_cc_form' => array(
73
'title' => __( 'Inline Credit Card Form', 'woocommerce-gateway-stripe' ),
74
'type' => 'checkbox',
43
),
44
'test_publishable_key' => array(
45
'title' => __( 'Test Publishable Key', 'woocommerce-gateway-stripe' ),
46
+ 'type' => 'text',
47
'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
48
'default' => '',
49
'desc_tip' => true,
55
'default' => '',
56
'desc_tip' => true,
57
),
58
+ 'test_webhook_secret' => array(
59
+ 'title' => __( 'Test Webhook Secret', 'woocommerce-gateway-stripe' ),
60
+ 'type' => 'password',
61
+ 'description' => __( 'Get your webhook signing secret from the webhooks section in your stripe account.', 'woocommerce-gateway-stripe' ),
62
+ 'default' => '',
63
+ 'desc_tip' => true,
64
+ ),
65
'publishable_key' => array(
66
'title' => __( 'Live Publishable Key', 'woocommerce-gateway-stripe' ),
67
+ 'type' => 'text',
68
'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
69
'default' => '',
70
'desc_tip' => true,
76
'default' => '',
77
'desc_tip' => true,
78
),
79
+ 'webhook_secret' => array(
80
+ 'title' => __( 'Webhook Secret', 'woocommerce-gateway-stripe' ),
81
+ 'type' => 'password',
82
+ 'description' => __( 'Get your webhook signing secret from the webhooks section in your stripe account.', 'woocommerce-gateway-stripe' ),
83
+ 'default' => '',
84
+ 'desc_tip' => true,
85
+ ),
86
'inline_cc_form' => array(
87
'title' => __( 'Inline Credit Card Form', 'woocommerce-gateway-stripe' ),
88
'type' => 'checkbox',
includes/class-wc-gateway-stripe.php CHANGED
@@ -985,7 +985,7 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
985
return;
986
}
987
988
- if ( 'succeeded' === $intent->status ) {
989
// Proceed with the payment completion.
990
$this->process_response( end( $intent->charges->data ), $order );
991
} else if ( 'requires_payment_method' === $intent->status ) {
985
return;
986
}
987
988
+ if ( 'succeeded' === $intent->status || 'requires_capture' === $intent->status ) {
989
// Proceed with the payment completion.
990
$this->process_response( end( $intent->charges->data ), $order );
991
} else if ( 'requires_payment_method' === $intent->status ) {
includes/class-wc-stripe-webhook-handler.php CHANGED
@@ -24,6 +24,13 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
24
*/
25
public $testmode;
26
27
/**
28
* Constructor.
29
*
@@ -34,6 +41,9 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
34
$this->retry_interval = 2;
35
$stripe_settings = get_option( 'woocommerce_stripe_settings', array() );
36
$this->testmode = ( ! empty( $stripe_settings['testmode'] ) && 'yes' === $stripe_settings['testmode'] ) ? true : false;
37
add_action( 'woocommerce_api_wc_stripe', array( $this, 'check_for_webhook' ) );
38
}
39
@@ -85,6 +95,29 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
85
return false;
86
}
87
88
return true;
89
}
90
@@ -503,11 +536,20 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
503
* @param object $notification
504
*/
505
public function process_review_opened( $notification ) {
506
- $order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->charge );
507
508
- if ( ! $order ) {
509
- WC_Stripe_Logger::log( 'Could not find order via charge ID: ' . $notification->data->object->charge );
510
- return;
511
}
512
513
/* translators: 1) The URL to the order. 2) The reason type. */
@@ -527,11 +569,20 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
527
* @param object $notification
528
*/
529
public function process_review_closed( $notification ) {
530
- $order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->charge );
531
532
- if ( ! $order ) {
533
- WC_Stripe_Logger::log( 'Could not find order via charge ID: ' . $notification->data->object->charge );
534
- return;
535
}
536
537
/* translators: 1) The reason type. */
@@ -610,16 +661,16 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
610
return;
611
}
612
613
if ( $this->lock_order_payment( $order, $intent ) ) {
614
return;
615
}
616
617
$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->id : $order->get_id();
618
if ( 'payment_intent.succeeded' === $notification->type || 'payment_intent.amount_capturable_updated' === $notification->type ) {
619
- if ( 'pending' !== $order->get_status() && 'failed' !== $order->get_status() ) {
620
- return;
621
- }
622
-
623
$charge = end( $intent->charges->data );
624
WC_Stripe_Logger::log( "Stripe PaymentIntent $intent->id succeeded for order $order_id" );
625
24
*/
25
public $testmode;
26
27
+ /**
28
+ * The secret to use when verifying webhooks.
29
+ *
30
+ * @var string
31
+ */
32
+ protected $secret;
33
+
34
/**
35
* Constructor.
36
*
41
$this->retry_interval = 2;
42
$stripe_settings = get_option( 'woocommerce_stripe_settings', array() );
43
$this->testmode = ( ! empty( $stripe_settings['testmode'] ) && 'yes' === $stripe_settings['testmode'] ) ? true : false;
44
+ $secret_key = ( $this->testmode ? 'test_' : '' ) . 'webhook_secret';
45
+ $this->secret = ! empty( $stripe_settings[ $secret_key ] ) ? $stripe_settings[ $secret_key ] : false;
46
+
47
add_action( 'woocommerce_api_wc_stripe', array( $this, 'check_for_webhook' ) );
48
}
49
95
return false;
96
}
97
98
+ if ( ! empty( $this->secret ) ) {
99
+ // Check for a valid signature.
100
+ $signature_format = '/^t=(?P<timestamp>\d+)(?P<signatures>(,v\d+=[a-z0-9]+){1,2})#x2F;';
101
+ if ( empty( $request_headers['STRIPE-SIGNATURE'] ) || ! preg_match( $signature_format, $request_headers['STRIPE-SIGNATURE'], $matches ) ) {
102
+ return false;
103
+ }
104
+
105
+ // Verify the timestamp.
106
+ $timestamp = intval( $matches['timestamp'] );
107
+ if ( abs( $timestamp - time() ) > MINUTE_IN_SECONDS ) {
108
+ return;
109
+ }
110
+
111
+ // Generate the expected signature.
112
+ $signed_payload = $timestamp . '.' . $request_body;
113
+ $expected_signature = hash_hmac( 'sha256', $signed_payload, $this->secret );
114
+
115
+ // Check if the expected signature is present.
116
+ if ( ! preg_match( '/,v\d+=' . preg_quote( $expected_signature, '/' ) . '/', $matches['signatures'] ) ) {
117
+ return false;
118
+ }
119
+ }
120
+
121
return true;
122
}
123
536
* @param object $notification
537
*/
538
public function process_review_opened( $notification ) {
539
+ if ( isset( $notification->data->object->payment_intent ) ) {
540
+ $order = WC_Stripe_Helper::get_order_by_intent_id( $notification->data->object->payment_intent );
541
542
+ if ( ! $order ) {
543
+ WC_Stripe_Logger::log( '[Review Opened] Could not find order via intent ID: ' . $notification->data->object->payment_intent );
544
+ return;
545
+ }
546
+ } else {
547
+ $order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->charge );
548
+
549
+ if ( ! $order ) {
550
+ WC_Stripe_Logger::log( '[Review Opened] Could not find order via charge ID: ' . $notification->data->object->charge );
551
+ return;
552
+ }
553
}
554
555
/* translators: 1) The URL to the order. 2) The reason type. */
569
* @param object $notification
570
*/
571
public function process_review_closed( $notification ) {
572
+ if ( isset( $notification->data->object->payment_intent ) ) {
573
+ $order = WC_Stripe_Helper::get_order_by_intent_id( $notification->data->object->payment_intent );
574
575
+ if ( ! $order ) {
576
+ WC_Stripe_Logger::log( '[Review Closed] Could not find order via intent ID: ' . $notification->data->object->payment_intent );
577
+ return;
578
+ }
579
+ } else {
580
+ $order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->charge );
581
+
582
+ if ( ! $order ) {
583
+ WC_Stripe_Logger::log( '[Review Closed] Could not find order via charge ID: ' . $notification->data->object->charge );
584
+ return;
585
+ }
586
}
587
588
/* translators: 1) The reason type. */
661
return;
662
}
663
664
+ if ( 'pending' !== $order->get_status() && 'failed' !== $order->get_status() ) {
665
+ return;
666
+ }
667
+
668
if ( $this->lock_order_payment( $order, $intent ) ) {
669
return;
670
}
671
672
$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->id : $order->get_id();
673
if ( 'payment_intent.succeeded' === $notification->type || 'payment_intent.amount_capturable_updated' === $notification->type ) {
674
$charge = end( $intent->charges->data );
675
WC_Stripe_Logger::log( "Stripe PaymentIntent $intent->id succeeded for order $order_id" );
676
languages/woocommerce-gateway-stripe.pot CHANGED
@@ -2,10 +2,10 @@
2
# This file is distributed under the same license as the WooCommerce Stripe Gateway package.
3
msgid ""
4
msgstr ""
5
- "Project-Id-Version: WooCommerce Stripe Gateway 4.2.2\n"
6
"Report-Msgid-Bugs-To: "
7
"https://wordpress.org/support/plugin/woocommerce-gateway-stripe\n"
8
- "POT-Creation-Date: 2019-06-26 20:05:17+00:00\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=utf-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
@@ -56,8 +56,8 @@ msgstr ""
56
57
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:439
58
#: includes/class-wc-stripe-order-handler.php:296
59
- #: includes/class-wc-stripe-webhook-handler.php:315
60
- #: includes/class-wc-stripe-webhook-handler.php:367
61
#. translators: transaction id
62
msgid "Stripe charge complete (Charge ID: %s)"
63
msgstr ""
@@ -558,7 +558,7 @@ msgid "Test Publishable Key"
558
msgstr ""
559
560
#: includes/admin/stripe-settings.php:47 includes/admin/stripe-settings.php:54
561
- #: includes/admin/stripe-settings.php:61 includes/admin/stripe-settings.php:68
562
msgid "Get your API keys from your stripe account."
563
msgstr ""
564
@@ -567,152 +567,166 @@ msgid "Test Secret Key"
567
msgstr ""
568
569
#: includes/admin/stripe-settings.php:59
570
- msgid "Live Publishable Key"
571
msgstr ""
572
573
#: includes/admin/stripe-settings.php:66
574
- msgid "Live Secret Key"
575
msgstr ""
576
577
#: includes/admin/stripe-settings.php:73
578
msgid "Inline Credit Card Form"
579
msgstr ""
580
581
- #: includes/admin/stripe-settings.php:75
582
msgid ""
583
"Choose the style you want to show for your credit card form. When "
584
"unchecked, the credit card form will display separate credit card number "
585
"field, expiry date field and cvc field."
586
msgstr ""
587
588
- #: includes/admin/stripe-settings.php:80
589
msgid "Statement Descriptor"
590
msgstr ""
591
592
- #: includes/admin/stripe-settings.php:82
593
msgid ""
594
"Statement descriptors are limited to 22 characters, cannot use the special "
595
"characters >, <, \", \\, ', *, and must not consist solely of numbers. This "
596
"will appear on your customer's statement in capital letters."
597
msgstr ""
598
599
- #: includes/admin/stripe-settings.php:87
600
msgid "Capture"
601
msgstr ""
602
603
- #: includes/admin/stripe-settings.php:88
604
msgid "Capture charge immediately"
605
msgstr ""
606
607
- #: includes/admin/stripe-settings.php:90
608
msgid ""
609
"Whether or not to immediately capture the charge. When unchecked, the "
610
"charge issues an authorization and will need to be captured later. "
611
"Uncaptured charges expire in 7 days."
612
msgstr ""
613
614
- #: includes/admin/stripe-settings.php:95
615
msgid "Payment Request Buttons"
616
msgstr ""
617
618
- #: includes/admin/stripe-settings.php:97
619
#. translators: 1) br tag 2) opening anchor tag 3) closing anchor tag
620
msgid ""
621
"Enable Payment Request Buttons. (Apple Pay/Chrome Payment Request API) "
622
"%1$sBy using Apple Pay, you agree to %2$s and %3$s's terms of service."
623
msgstr ""
624
625
- #: includes/admin/stripe-settings.php:99
626
msgid ""
627
"If enabled, users will be able to pay using Apple Pay or Chrome Payment "
628
"Request if supported by the browser."
629
msgstr ""
630
631
- #: includes/admin/stripe-settings.php:104
632
msgid "Payment Request Button Type"
633
msgstr ""
634
635
- #: includes/admin/stripe-settings.php:105
636
msgid "Button Type"
637
msgstr ""
638
639
- #: includes/admin/stripe-settings.php:107
640
msgid "Select the button type you would like to show."
641
msgstr ""
642
643
- #: includes/admin/stripe-settings.php:111
644
msgid "Default"
645
msgstr ""
646
647
- #: includes/admin/stripe-settings.php:112
648
msgid "Buy"
649
msgstr ""
650
651
- #: includes/admin/stripe-settings.php:113
652
msgid "Donate"
653
msgstr ""
654
655
- #: includes/admin/stripe-settings.php:117
656
msgid "Payment Request Button Theme"
657
msgstr ""
658
659
- #: includes/admin/stripe-settings.php:118
660
msgid "Button Theme"
661
msgstr ""
662
663
- #: includes/admin/stripe-settings.php:120
664
msgid "Select the button theme you would like to show."
665
msgstr ""
666
667
- #: includes/admin/stripe-settings.php:124
668
msgid "Dark"
669
msgstr ""
670
671
- #: includes/admin/stripe-settings.php:125
672
msgid "Light"
673
msgstr ""
674
675
- #: includes/admin/stripe-settings.php:126
676
msgid "Light-Outline"
677
msgstr ""
678
679
- #: includes/admin/stripe-settings.php:130
680
msgid "Payment Request Button Height"
681
msgstr ""
682
683
- #: includes/admin/stripe-settings.php:131
684
msgid "Button Height"
685
msgstr ""
686
687
- #: includes/admin/stripe-settings.php:133
688
msgid ""
689
"Enter the height you would like the button to be in pixels. Width will "
690
"always be 100%."
691
msgstr ""
692
693
- #: includes/admin/stripe-settings.php:138
694
msgid "Saved Cards"
695
msgstr ""
696
697
- #: includes/admin/stripe-settings.php:139
698
msgid "Enable Payment via Saved Cards"
699
msgstr ""
700
701
- #: includes/admin/stripe-settings.php:141
702
msgid ""
703
"If enabled, users will be able to pay with a saved card during checkout. "
704
"Card details are saved on Stripe servers, not on your store."
705
msgstr ""
706
707
- #: includes/admin/stripe-settings.php:146
708
msgid "Logging"
709
msgstr ""
710
711
- #: includes/admin/stripe-settings.php:147
712
msgid "Log debug messages"
713
msgstr ""
714
715
- #: includes/admin/stripe-settings.php:149
716
msgid "Save debug messages to the WooCommerce System Status log."
717
msgstr ""
718
@@ -839,7 +853,7 @@ msgstr ""
839
840
#: includes/class-wc-gateway-stripe.php:810
841
#: includes/class-wc-stripe-order-handler.php:162
842
- #: includes/class-wc-stripe-webhook-handler.php:206
843
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:263
844
#: includes/compat/class-wc-stripe-subs-compat.php:244
845
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:373
@@ -857,7 +871,7 @@ msgid ""
857
msgstr ""
858
859
#: includes/class-wc-gateway-stripe.php:1015
860
- #: includes/class-wc-stripe-webhook-handler.php:635
861
#. translators: 1) The error message that was received from Stripe.
862
msgid "Stripe SCA authentication failed. Reason: %s"
863
msgstr ""
@@ -990,7 +1004,7 @@ msgid "Payment verification error: %s"
990
msgstr ""
991
992
#: includes/class-wc-stripe-order-handler.php:144
993
- #: includes/class-wc-stripe-webhook-handler.php:187
994
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:353
995
msgid "This card is no longer available and has been removed."
996
msgstr ""
@@ -1017,7 +1031,7 @@ msgstr ""
1017
msgid "SEPA IBAN ending in %s"
1018
msgstr ""
1019
1020
- #: includes/class-wc-stripe-webhook-handler.php:264
1021
#. translators: 1) The URL to the order.
1022
msgid ""
1023
"A dispute was created for this order. Response is needed. Please go to your "
@@ -1025,34 +1039,34 @@ msgid ""
1025
"Dashboard</a> to review this dispute."
1026
msgstr ""
1027
1028
- #: includes/class-wc-stripe-webhook-handler.php:310
1029
#. translators: partial captured amount
1030
msgid "This charge was partially captured via Stripe Dashboard in the amount of: %s"
1031
msgstr ""
1032
1033
- #: includes/class-wc-stripe-webhook-handler.php:396
1034
msgid "This payment failed to clear."
1035
msgstr ""
1036
1037
- #: includes/class-wc-stripe-webhook-handler.php:429
1038
msgid "This payment has cancelled."
1039
msgstr ""
1040
1041
- #: includes/class-wc-stripe-webhook-handler.php:464
1042
msgid "Refunded via Stripe Dashboard"
1043
msgstr ""
1044
1045
- #: includes/class-wc-stripe-webhook-handler.php:464
1046
- #: includes/class-wc-stripe-webhook-handler.php:492
1047
msgid "Pre-Authorization Released via Stripe Dashboard"
1048
msgstr ""
1049
1050
- #: includes/class-wc-stripe-webhook-handler.php:492
1051
#. translators: 1) dollar amount 2) transaction id 3) refund message
1052
msgid "Refunded %1$s - Refund ID: %2$s - %3$s"
1053
msgstr ""
1054
1055
- #: includes/class-wc-stripe-webhook-handler.php:514
1056
#. translators: 1) The URL to the order. 2) The reason type.
1057
msgid ""
1058
"A review has been opened for this order. Action is needed. Please go to "
@@ -1060,7 +1074,7 @@ msgid ""
1060
"Dashboard</a> to review the issue. Reason: (%2$s)"
1061
msgstr ""
1062
1063
- #: includes/class-wc-stripe-webhook-handler.php:538
1064
#. translators: 1) The reason type.
1065
msgid "The opened review for this order is now closed. Reason: (%s)"
1066
msgstr ""
@@ -1328,4 +1342,4 @@ msgstr ""
1328
1329
#. Author URI of the plugin/theme
1330
msgid "https://woocommerce.com/"
1331
- msgstr ""
2
# This file is distributed under the same license as the WooCommerce Stripe Gateway package.
3
msgid ""
4
msgstr ""
5
+ "Project-Id-Version: WooCommerce Stripe Gateway 4.2.3\n"
6
"Report-Msgid-Bugs-To: "
7
"https://wordpress.org/support/plugin/woocommerce-gateway-stripe\n"
8
+ "POT-Creation-Date: 2019-07-12 15:21:21+00:00\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=utf-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
56
57
#: includes/abstracts/abstract-wc-stripe-payment-gateway.php:439
58
#: includes/class-wc-stripe-order-handler.php:296
59
+ #: includes/class-wc-stripe-webhook-handler.php:340
60
+ #: includes/class-wc-stripe-webhook-handler.php:392
61
#. translators: transaction id
62
msgid "Stripe charge complete (Charge ID: %s)"
63
msgstr ""
558
msgstr ""
559
560
#: includes/admin/stripe-settings.php:47 includes/admin/stripe-settings.php:54
561
+ #: includes/admin/stripe-settings.php:68 includes/admin/stripe-settings.php:75
562
msgid "Get your API keys from your stripe account."
563
msgstr ""
564
567
msgstr ""
568
569
#: includes/admin/stripe-settings.php:59
570
+ msgid "Test Webhook Secret"
571
+ msgstr ""
572
+
573
+ #: includes/admin/stripe-settings.php:61 includes/admin/stripe-settings.php:82
574
+ msgid ""
575
+ "Get your webhook signing secret from the webhooks section in your stripe "
576
+ "account."
577
msgstr ""
578
579
#: includes/admin/stripe-settings.php:66
580
+ msgid "Live Publishable Key"
581
msgstr ""
582
583
#: includes/admin/stripe-settings.php:73
584
+ msgid "Live Secret Key"
585
+ msgstr ""
586
+
587
+ #: includes/admin/stripe-settings.php:80
588
+ msgid "Webhook Secret"
589
+ msgstr ""
590
+
591
+ #: includes/admin/stripe-settings.php:87
592
msgid "Inline Credit Card Form"
593
msgstr ""
594
595
+ #: includes/admin/stripe-settings.php:89
596
msgid ""
597
"Choose the style you want to show for your credit card form. When "
598
"unchecked, the credit card form will display separate credit card number "
599
"field, expiry date field and cvc field."
600
msgstr ""
601
602
+ #: includes/admin/stripe-settings.php:94
603
msgid "Statement Descriptor"
604
msgstr ""
605
606
+ #: includes/admin/stripe-settings.php:96
607
msgid ""
608
"Statement descriptors are limited to 22 characters, cannot use the special "
609
"characters >, <, \", \\, ', *, and must not consist solely of numbers. This "
610
"will appear on your customer's statement in capital letters."
611
msgstr ""
612
613
+ #: includes/admin/stripe-settings.php:101
614
msgid "Capture"
615
msgstr ""
616
617
+ #: includes/admin/stripe-settings.php:102
618
msgid "Capture charge immediately"
619
msgstr ""
620
621
+ #: includes/admin/stripe-settings.php:104
622
msgid ""
623
"Whether or not to immediately capture the charge. When unchecked, the "
624
"charge issues an authorization and will need to be captured later. "
625
"Uncaptured charges expire in 7 days."
626
msgstr ""
627
628
+ #: includes/admin/stripe-settings.php:109
629
msgid "Payment Request Buttons"
630
msgstr ""
631
632
+ #: includes/admin/stripe-settings.php:111
633
#. translators: 1) br tag 2) opening anchor tag 3) closing anchor tag
634
msgid ""
635
"Enable Payment Request Buttons. (Apple Pay/Chrome Payment Request API) "
636
"%1$sBy using Apple Pay, you agree to %2$s and %3$s's terms of service."
637
msgstr ""
638
639
+ #: includes/admin/stripe-settings.php:113
640
msgid ""
641
"If enabled, users will be able to pay using Apple Pay or Chrome Payment "
642
"Request if supported by the browser."
643
msgstr ""
644
645
+ #: includes/admin/stripe-settings.php:118
646
msgid "Payment Request Button Type"
647
msgstr ""
648
649
+ #: includes/admin/stripe-settings.php:119
650
msgid "Button Type"
651
msgstr ""
652
653
+ #: includes/admin/stripe-settings.php:121
654
msgid "Select the button type you would like to show."
655
msgstr ""
656
657
+ #: includes/admin/stripe-settings.php:125
658
msgid "Default"
659
msgstr ""
660
661
+ #: includes/admin/stripe-settings.php:126
662
msgid "Buy"
663
msgstr ""
664
665
+ #: includes/admin/stripe-settings.php:127
666
msgid "Donate"
667
msgstr ""
668
669
+ #: includes/admin/stripe-settings.php:131
670
msgid "Payment Request Button Theme"
671
msgstr ""
672
673
+ #: includes/admin/stripe-settings.php:132
674
msgid "Button Theme"
675
msgstr ""
676
677
+ #: includes/admin/stripe-settings.php:134
678
msgid "Select the button theme you would like to show."
679
msgstr ""
680
681
+ #: includes/admin/stripe-settings.php:138
682
msgid "Dark"
683
msgstr ""
684
685
+ #: includes/admin/stripe-settings.php:139
686
msgid "Light"
687
msgstr ""
688
689
+ #: includes/admin/stripe-settings.php:140
690
msgid "Light-Outline"
691
msgstr ""
692
693
+ #: includes/admin/stripe-settings.php:144
694
msgid "Payment Request Button Height"
695
msgstr ""
696
697
+ #: includes/admin/stripe-settings.php:145
698
msgid "Button Height"
699
msgstr ""
700
701
+ #: includes/admin/stripe-settings.php:147
702
msgid ""
703
"Enter the height you would like the button to be in pixels. Width will "
704
"always be 100%."
705
msgstr ""
706
707
+ #: includes/admin/stripe-settings.php:152
708
msgid "Saved Cards"
709
msgstr ""
710
711
+ #: includes/admin/stripe-settings.php:153
712
msgid "Enable Payment via Saved Cards"
713
msgstr ""
714
715
+ #: includes/admin/stripe-settings.php:155
716
msgid ""
717
"If enabled, users will be able to pay with a saved card during checkout. "
718
"Card details are saved on Stripe servers, not on your store."
719
msgstr ""
720
721
+ #: includes/admin/stripe-settings.php:160
722
msgid "Logging"
723
msgstr ""
724
725
+ #: includes/admin/stripe-settings.php:161
726
msgid "Log debug messages"
727
msgstr ""
728
729
+ #: includes/admin/stripe-settings.php:163
730
msgid "Save debug messages to the WooCommerce System Status log."
731
msgstr ""
732
853
854
#: includes/class-wc-gateway-stripe.php:810
855
#: includes/class-wc-stripe-order-handler.php:162
856
+ #: includes/class-wc-stripe-webhook-handler.php:231
857
#: includes/compat/class-wc-stripe-sepa-subs-compat.php:263
858
#: includes/compat/class-wc-stripe-subs-compat.php:244
859
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:373
871
msgstr ""
872
873
#: includes/class-wc-gateway-stripe.php:1015
874
+ #: includes/class-wc-stripe-webhook-handler.php:660
875
#. translators: 1) The error message that was received from Stripe.
876
msgid "Stripe SCA authentication failed. Reason: %s"
877
msgstr ""
1004
msgstr ""
1005
1006
#: includes/class-wc-stripe-order-handler.php:144
1007
+ #: includes/class-wc-stripe-webhook-handler.php:212
1008
#: includes/payment-methods/class-wc-gateway-stripe-sepa.php:353
1009
msgid "This card is no longer available and has been removed."
1010
msgstr ""
1031
msgid "SEPA IBAN ending in %s"
1032
msgstr ""
1033
1034
+ #: includes/class-wc-stripe-webhook-handler.php:289
1035
#. translators: 1) The URL to the order.
1036
msgid ""
1037
"A dispute was created for this order. Response is needed. Please go to your "
1039
"Dashboard</a> to review this dispute."
1040
msgstr ""
1041
1042
+ #: includes/class-wc-stripe-webhook-handler.php:335
1043
#. translators: partial captured amount
1044
msgid "This charge was partially captured via Stripe Dashboard in the amount of: %s"
1045
msgstr ""
1046
1047
+ #: includes/class-wc-stripe-webhook-handler.php:421
1048
msgid "This payment failed to clear."
1049
msgstr ""
1050
1051
+ #: includes/class-wc-stripe-webhook-handler.php:454
1052
msgid "This payment has cancelled."
1053
msgstr ""
1054
1055
+ #: includes/class-wc-stripe-webhook-handler.php:489
1056
msgid "Refunded via Stripe Dashboard"
1057
msgstr ""
1058
1059
+ #: includes/class-wc-stripe-webhook-handler.php:489
1060
+ #: includes/class-wc-stripe-webhook-handler.php:517
1061
msgid "Pre-Authorization Released via Stripe Dashboard"
1062
msgstr ""
1063
1064
+ #: includes/class-wc-stripe-webhook-handler.php:517
1065
#. translators: 1) dollar amount 2) transaction id 3) refund message
1066
msgid "Refunded %1$s - Refund ID: %2$s - %3$s"
1067
msgstr ""
1068
1069
+ #: includes/class-wc-stripe-webhook-handler.php:539
1070
#. translators: 1) The URL to the order. 2) The reason type.
1071
msgid ""
1072
"A review has been opened for this order. Action is needed. Please go to "
1074
"Dashboard</a> to review the issue. Reason: (%2$s)"
1075
msgstr ""
1076
1077
+ #: includes/class-wc-stripe-webhook-handler.php:563
1078
#. translators: 1) The reason type.
1079
msgid "The opened review for this order is now closed. Reason: (%s)"
1080
msgstr ""
1342
1343
#. Author URI of the plugin/theme
1344
msgid "https://woocommerce.com/"
1345
+ msgstr ""
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.2
8
License: GPLv3
9
License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
Attributions: thorsten-stripe
@@ -113,8 +113,11 @@ If you get stuck, you can ask for help in the Plugin Forum.
113
114
== Changelog ==
115
116
- = 4.2.2 - 2019-06-26 =
117
- * Fix - Changing an order status to "Cancelled" or "Refunded" will no longer refund the payment, will only void the payment if it was just authorized.
118
119
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/master/changelog.txt).
120
4
Requires at least: 4.4
5
Tested up to: 5.2.1
6
Requires PHP: 5.6
7
+ Stable tag: 4.2.3
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.3 - 2019-07-18 =
117
+ * Fix - Ignore "payment failed" webhooks if they come after another payment has already succeeded for that order.
118
+ * Fix - Correctly transition an order to "On Hold" if the payment was put under review by Stripe Radar, and back to "Processing" when the review is approved.
119
+ * Tweak - Make the publishable key fields be plain text instead of "password".
120
+ * Fix - Fix successful retries of 3ds failing.
121
122
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/master/changelog.txt).
123
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.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.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.3
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.3' );
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__ );