Version Description
- Added - Merchants can now control which payment buttons appear for each product and their positioning
- Added - VAT tax display for Apple Pay, GPay, Payment Request
- Added - Optional Stripe email receipt
- Updated - Stripe API version to 2020-03-02
- Fixed - iDEAL not redirecting on order pay page.
Download this release
Release Info
Developer | mr.clayton |
Plugin | Payment Plugins for Stripe WooCommerce |
Version | 3.1.2 |
Comparing to | |
See all releases |
Code changes from version 3.1.1 to 3.1.2
- assets/css/admin/admin.css +27 -0
- assets/css/stripe.css +5 -0
- assets/js/admin/meta-boxes-product-data.js +127 -0
- assets/js/frontend/local-payment.js +36 -5
- assets/js/frontend/wc-stripe.js +12 -12
- assets/js/frontend/wc-stripe.min.js +1 -1
- i18n/languages/woo-stripe-payment.pot +332 -623
- includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php +38 -5
- includes/abstract/abstract-wc-payment-gateway-stripe.php +12 -2
- includes/admin/class-wc-stripe-admin-assets.php +16 -0
- includes/admin/class-wc-stripe-admin-settings.php +19 -0
- includes/admin/meta-boxes/class-wc-stripe-admin-meta-box-product-data.php +93 -0
- includes/admin/meta-boxes/views/html-product-data.php +61 -0
- includes/class-stripe.php +9 -5
- includes/class-wc-stripe-constants.php +6 -0
- includes/class-wc-stripe-field-manager.php +36 -8
- includes/class-wc-stripe-frontend-scripts.php +4 -1
- includes/class-wc-stripe-gateway.php +1 -1
- includes/class-wc-stripe-payment-charge.php +3 -1
- includes/class-wc-stripe-payment-intent.php +1 -3
- includes/class-wc-stripe-product-gateway-option.php +102 -0
- includes/class-wc-stripe-product-option.php +102 -0
- includes/class-wc-stripe-rest-api.php +4 -1
- includes/controllers/class-wc-stripe-controller-checkout.php +25 -0
- includes/controllers/class-wc-stripe-controller-product-data.php +79 -0
- includes/gateways/class-wc-payment-gateway-stripe-cc.php +1 -1
- includes/gateways/class-wc-payment-gateway-stripe-googlepay.php +27 -8
- includes/gateways/class-wc-payment-gateway-stripe-klarna.php +21 -4
- includes/gateways/settings/applepay-settings.php +3 -3
- includes/gateways/settings/cc-settings.php +1 -1
- includes/gateways/settings/googlepay-settings.php +1 -1
- includes/gateways/settings/payment-request-settings.php +1 -1
- includes/traits/wc-stripe-payment-traits.php +1 -0
- includes/wc-stripe-functions.php +35 -11
- readme.txt +8 -1
- stripe-payments.php +2 -2
- templates/product/payment-methods.php +1 -1
assets/css/admin/admin.css
CHANGED
@@ -259,4 +259,31 @@
|
|
259 |
height: 30px;
|
260 |
margin-top: -5px;
|
261 |
margin-left: -8px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
}
|
259 |
height: 30px;
|
260 |
margin-top: -5px;
|
261 |
margin-left: -8px;
|
262 |
+
}
|
263 |
+
|
264 |
+
.woocommerce_stripe_panel table{
|
265 |
+
width: 100%;
|
266 |
+
}
|
267 |
+
.wc-stripe-product-table th{
|
268 |
+
text-align: left;
|
269 |
+
}
|
270 |
+
.wc-stripe-product-gateway-enabled{
|
271 |
+
padding-top: 1px;
|
272 |
+
display: block;
|
273 |
+
outline: 0;
|
274 |
+
box-shadow: none;
|
275 |
+
}
|
276 |
+
.wc-stripe-save-product-data.disabled{
|
277 |
+
opactity: 0.6;
|
278 |
+
}
|
279 |
+
#stripe_product_data .wc-stripe-save-product-data + span.spinner{
|
280 |
+
float: none;
|
281 |
+
margin: 0 0 0 10px;
|
282 |
+
}
|
283 |
+
#woocommerce-product-data ul.wc-tabs li.stripe_options a:before{
|
284 |
+
font-family: WooCommerce;
|
285 |
+
content: '\e01e';
|
286 |
+
}
|
287 |
+
#_stripe_button_position{
|
288 |
+
max-width: 200px;
|
289 |
}
|
assets/css/stripe.css
CHANGED
@@ -225,8 +225,13 @@ li.payment_method_stripe_payment_request{
|
|
225 |
.wc-stripe-product-checkout-container{
|
226 |
display: none;
|
227 |
width: 100%;
|
|
|
|
|
228 |
margin-top: 1em;
|
229 |
}
|
|
|
|
|
|
|
230 |
.wc-stripe-product-checkout-container.active{
|
231 |
display: block;
|
232 |
}
|
225 |
.wc-stripe-product-checkout-container{
|
226 |
display: none;
|
227 |
width: 100%;
|
228 |
+
}
|
229 |
+
.wc-stripe-product-checkout-container.bottom{
|
230 |
margin-top: 1em;
|
231 |
}
|
232 |
+
.wc-stripe-product-checkout-container.top{
|
233 |
+
margin-bottom: 1em;
|
234 |
+
}
|
235 |
.wc-stripe-product-checkout-container.active{
|
236 |
display: block;
|
237 |
}
|
assets/js/admin/meta-boxes-product-data.js
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($) {
|
2 |
+
function Product() {
|
3 |
+
this.init();
|
4 |
+
}
|
5 |
+
|
6 |
+
Product.prototype.params = {
|
7 |
+
loadingClass: 'woocommerce-input-toggle--loading',
|
8 |
+
enabledClass: 'woocommerce-input-toggle--enabled',
|
9 |
+
disabledClass: 'woocommerce-input-toggle--disabled'
|
10 |
+
}
|
11 |
+
|
12 |
+
Product.prototype.init = function() {
|
13 |
+
$('table.wc_gateways').sortable({
|
14 |
+
items: 'tr',
|
15 |
+
axis: 'y',
|
16 |
+
cursor: 'move',
|
17 |
+
scrollSensitivity: 40,
|
18 |
+
forcePlaceholderSize: true,
|
19 |
+
helper: 'clone',
|
20 |
+
opacity: 0.65,
|
21 |
+
placeholder: 'wc-metabox-sortable-placeholder',
|
22 |
+
start: function(event, ui) {
|
23 |
+
ui.item.css('background-color', '#f6f6f6');
|
24 |
+
},
|
25 |
+
stop: function(event, ui) {
|
26 |
+
ui.item.removeAttr('style');
|
27 |
+
}
|
28 |
+
});
|
29 |
+
|
30 |
+
$('table.wc_gateways').find('.wc-move-down, .wc-move-up').on('click', this.move_gateway.bind(this));
|
31 |
+
$('table.wc_gateways .wc-stripe-product-gateway-enabled').on('click', this.enable_gateway.bind(this));
|
32 |
+
$('.wc-stripe-save-product-data').on('click', this.save.bind(this));
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* [Move the payment gateway up or down]
|
37 |
+
* @return {[type]} [description]
|
38 |
+
*/
|
39 |
+
Product.prototype.move_gateway = function(e) {
|
40 |
+
var $this = $(e.currentTarget);
|
41 |
+
var $row = $this.closest('tr');
|
42 |
+
|
43 |
+
var moveDown = $this.is('.wc-move-down');
|
44 |
+
|
45 |
+
if (moveDown) {
|
46 |
+
var $next = $row.next('tr');
|
47 |
+
if ($next && $next.length) {
|
48 |
+
$next.after($row);
|
49 |
+
}
|
50 |
+
} else {
|
51 |
+
var $prev = $row.prev('tr');
|
52 |
+
if ($prev && $prev.length) {
|
53 |
+
$prev.before($row);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* [enable_gateway description]
|
60 |
+
* @param {[type]} e [description]
|
61 |
+
* @return {[type]} [description]
|
62 |
+
*/
|
63 |
+
Product.prototype.enable_gateway = function(e) {
|
64 |
+
e.preventDefault();
|
65 |
+
var $el = $(e.currentTarget),
|
66 |
+
$row = $el.closest('tr'),
|
67 |
+
$toggle = $el.find('.woocommerce-input-toggle');
|
68 |
+
$toggle.addClass(this.params.loadingClass);
|
69 |
+
$.ajax({
|
70 |
+
url: wc_stripe_product_params.routes.enable_gateway,
|
71 |
+
method: 'POST',
|
72 |
+
dataType: 'json',
|
73 |
+
data: {
|
74 |
+
_wpnonce: wc_stripe_product_params._wpnonce,
|
75 |
+
product_id: $('#post_ID').val(),
|
76 |
+
gateway_id: $row.data('gateway_id')
|
77 |
+
}
|
78 |
+
}).done(function(response) {
|
79 |
+
$toggle.removeClass(this.params.loadingClass);
|
80 |
+
if (response.enabled) {
|
81 |
+
$toggle.addClass(this.params.enabledClass).removeClass(this.params.disabledClass);
|
82 |
+
} else {
|
83 |
+
$toggle.removeClass(this.params.enabledClass).addClass(this.params.disabledClass);
|
84 |
+
}
|
85 |
+
}.bind(this)).fail(function(xhr, errorStatus, errorThrown) {
|
86 |
+
$toggle.removeClass(this.params.loadingClass);
|
87 |
+
}.bind(this))
|
88 |
+
}
|
89 |
+
|
90 |
+
Product.prototype.save = function(e) {
|
91 |
+
e.preventDefault();
|
92 |
+
var $button = $(e.currentTarget);
|
93 |
+
var gateways = [],
|
94 |
+
charge_types = [];
|
95 |
+
$('[name^="stripe_gateway_order"]').each(function(idx, el) {
|
96 |
+
gateways.push($(el).val());
|
97 |
+
});
|
98 |
+
$('[name^="stripe_capture_type"]').each(function(idx, el) {
|
99 |
+
charge_types.push({
|
100 |
+
gateway: $(el).closest('tr').data('gateway_id'),
|
101 |
+
value: $(el).val()
|
102 |
+
});
|
103 |
+
})
|
104 |
+
$button.toggleClass('disabled').prop('disabled', true);
|
105 |
+
$button.next('.spinner').toggleClass('is-active');
|
106 |
+
$.ajax({
|
107 |
+
url: wc_stripe_product_params.routes.save,
|
108 |
+
method: 'POST',
|
109 |
+
dataType: 'json',
|
110 |
+
data: {
|
111 |
+
_wpnonce: wc_stripe_product_params._wpnonce,
|
112 |
+
gateways: gateways,
|
113 |
+
charge_types: charge_types,
|
114 |
+
product_id: $('#post_ID').val(),
|
115 |
+
position: $('#_stripe_button_position').val()
|
116 |
+
}
|
117 |
+
}).done(function(response) {
|
118 |
+
$button.toggleClass('disabled').prop('disabled', false);
|
119 |
+
$button.next('.spinner').toggleClass('is-active');
|
120 |
+
}).fail(function(xhr, errorStatus, errorthrown) {
|
121 |
+
$button.toggleClass('disabled').prop('disabled', false);
|
122 |
+
$button.next('.spinner').toggleClass('is-active');
|
123 |
+
}.bind(this))
|
124 |
+
}
|
125 |
+
|
126 |
+
new Product();
|
127 |
+
}(jQuery))
|
assets/js/frontend/local-payment.js
CHANGED
@@ -16,6 +16,10 @@
|
|
16 |
wc_stripe.CheckoutGateway.call(this);
|
17 |
|
18 |
$(document.body).on('click', '#place_order', this.place_order.bind(this));
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
LocalPayment.prototype = $.extend({}, wc_stripe.BaseGateway.prototype, wc_stripe.CheckoutGateway.prototype);
|
@@ -63,6 +67,29 @@
|
|
63 |
}
|
64 |
}
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
LocalPayment.prototype.updated_checkout = function() {
|
67 |
if (this.payment_token_received) {
|
68 |
this.show_place_order();
|
@@ -134,15 +161,19 @@
|
|
134 |
var match = e.newURL.match(/response=(.*)/);
|
135 |
if (match) {
|
136 |
var obj = JSON.parse(window.atob(match[1]));
|
137 |
-
this.
|
138 |
-
if (result.error) {
|
139 |
-
this.submit_error(result.error.message);
|
140 |
-
}
|
141 |
-
}.bind(this))
|
142 |
}
|
143 |
}
|
144 |
}
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
LocalPayment.prototype.get_confirmation_args = function(obj) {
|
147 |
var args = {
|
148 |
payment_method: {
|
16 |
wc_stripe.CheckoutGateway.call(this);
|
17 |
|
18 |
$(document.body).on('click', '#place_order', this.place_order.bind(this));
|
19 |
+
|
20 |
+
if ($(document.body).is('.woocommerce-order-pay')) {
|
21 |
+
$('#order_review').on('submit', this.process_order_pay.bind(this));
|
22 |
+
}
|
23 |
}
|
24 |
|
25 |
LocalPayment.prototype = $.extend({}, wc_stripe.BaseGateway.prototype, wc_stripe.CheckoutGateway.prototype);
|
67 |
}
|
68 |
}
|
69 |
|
70 |
+
LocalPayment.prototype.process_order_pay = function(e) {
|
71 |
+
if (this.is_gateway_selected()) {
|
72 |
+
e.preventDefault();
|
73 |
+
var data = this.get_form().serializeArray();
|
74 |
+
data.push({ name: '_wpnonce', value: this.params.rest_nonce });
|
75 |
+
data.push({ name: 'order_id', value: this.params.order_id });
|
76 |
+
$.ajax({
|
77 |
+
url: this.params.routes.order_pay + window.location.search,
|
78 |
+
method: 'POST',
|
79 |
+
dataType: 'json',
|
80 |
+
data: $.param(data)
|
81 |
+
}).done(function(response) {
|
82 |
+
if (response.success) {
|
83 |
+
window.location.href = response.redirect;
|
84 |
+
} else {
|
85 |
+
this.submit_error(response.message);
|
86 |
+
}
|
87 |
+
}.bind(this)).fail(function(jqXHR, textStatus, errorThrown) {
|
88 |
+
this.submit_error(errorThrown);
|
89 |
+
}.bind(this))
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
LocalPayment.prototype.updated_checkout = function() {
|
94 |
if (this.payment_token_received) {
|
95 |
this.show_place_order();
|
161 |
var match = e.newURL.match(/response=(.*)/);
|
162 |
if (match) {
|
163 |
var obj = JSON.parse(window.atob(match[1]));
|
164 |
+
this.processConfirmation(obj);
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
}
|
167 |
}
|
168 |
|
169 |
+
LocalPayment.prototype.processConfirmation = function(obj) {
|
170 |
+
this.stripe[this.confirmation_method](obj.client_secret, this.get_confirmation_args(obj)).then(function(result) {
|
171 |
+
if (result.error) {
|
172 |
+
this.submit_error(result.error.message);
|
173 |
+
}
|
174 |
+
}.bind(this))
|
175 |
+
}
|
176 |
+
|
177 |
LocalPayment.prototype.get_confirmation_args = function(obj) {
|
178 |
var args = {
|
179 |
payment_method: {
|
assets/js/frontend/wc-stripe.js
CHANGED
@@ -1,17 +1,6 @@
|
|
1 |
(function(window, $) {
|
2 |
window.wc_stripe = {};
|
3 |
-
|
4 |
-
try {
|
5 |
-
/**
|
6 |
-
* [Initiate Stripe]
|
7 |
-
* @type {[type]}
|
8 |
-
*/
|
9 |
-
var stripe = Stripe(wc_stripe_params_v3.api_key);
|
10 |
-
} catch (error) {
|
11 |
-
window.alert(error);
|
12 |
-
console.log(error);
|
13 |
-
return;
|
14 |
-
}
|
15 |
|
16 |
/**
|
17 |
* @consructor
|
@@ -975,6 +964,9 @@
|
|
975 |
$('form.cart').on('reset_data', this.reset_variation_data.bind(this));
|
976 |
|
977 |
this.buttonWidth = $('div.quantity').outerWidth(true) + $('.single_add_to_cart_button').outerWidth();
|
|
|
|
|
|
|
978 |
$(this.container).css('max-width', this.buttonWidth + 'px');
|
979 |
}
|
980 |
|
@@ -1678,4 +1670,12 @@
|
|
1678 |
this.paymentRequestButton.mount('#wc-stripe-payment-request-container');
|
1679 |
}
|
1680 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1681 |
}(window, jQuery))
|
1 |
(function(window, $) {
|
2 |
window.wc_stripe = {};
|
3 |
+
var stripe = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
/**
|
6 |
* @consructor
|
964 |
$('form.cart').on('reset_data', this.reset_variation_data.bind(this));
|
965 |
|
966 |
this.buttonWidth = $('div.quantity').outerWidth(true) + $('.single_add_to_cart_button').outerWidth();
|
967 |
+
if ((marginLeft = $('.single_add_to_cart_button').css('marginLeft'))) {
|
968 |
+
this.buttonWidth += parseInt(marginLeft.replace('px', ''));
|
969 |
+
}
|
970 |
$(this.container).css('max-width', this.buttonWidth + 'px');
|
971 |
}
|
972 |
|
1670 |
this.paymentRequestButton.mount('#wc-stripe-payment-request-container');
|
1671 |
}
|
1672 |
|
1673 |
+
try {
|
1674 |
+
stripe = Stripe(wc_stripe_params_v3.api_key);
|
1675 |
+
} catch (error) {
|
1676 |
+
window.alert(error);
|
1677 |
+
console.log(error);
|
1678 |
+
return;
|
1679 |
+
}
|
1680 |
+
|
1681 |
}(window, jQuery))
|
assets/js/frontend/wc-stripe.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t,e){t.wc_stripe={};try{var i=Stripe(wc_stripe_params_v3.api_key)}catch(e){return t.alert(e),void console.log(e)}wc_stripe.BaseGateway=function(t){this.params=t,this.gateway_id=this.params.gateway_id,this.token_selector=this.params.token_selector,this.saved_method_selector=this.params.saved_method_selector,this.payment_intent_selector=this.params.payment_intent_selector,this.payment_token_received=!1,this.stripe=i,this.elements=i.elements(e.extend({},{locale:"auto"},this.get_element_options())),this.initialize()},wc_stripe.BaseGateway.prototype.get_page=function(){return wc_stripe_params_v3.page},wc_stripe.BaseGateway.prototype.set_nonce=function(t){e(this.token_selector).val(t)},wc_stripe.BaseGateway.prototype.get_element_options=function(){return{}},wc_stripe.BaseGateway.prototype.initialize=function(){},wc_stripe.BaseGateway.prototype.create_button=function(){},wc_stripe.BaseGateway.prototype.is_gateway_selected=function(){return e('[name="payment_method"]:checked').val()===this.gateway_id},wc_stripe.BaseGateway.prototype.is_saved_method_selected=function(){return this.is_gateway_selected()&&"saved"===e('[name="'+this.gateway_id+'_payment_type_key"]:checked').val()},wc_stripe.BaseGateway.prototype.has_checkout_error=function(){return e("#wc_stripe_checkout_error").length>0&&this.is_gateway_selected()},wc_stripe.BaseGateway.prototype.submit_error=function(t){-1==(t=this.get_error_message(t)).indexOf("</ul>")&&(t='<div class="woocommerce-error">'+t+"</div>"),this.submit_message(t)},wc_stripe.BaseGateway.prototype.submit_error_code=function(t){},wc_stripe.BaseGateway.prototype.get_error_message=function(t){return"object"==typeof t&&t.code&&(t=wc_stripe_messages[t.code]?wc_stripe_messages[t.code]:t.message),t},wc_stripe.BaseGateway.prototype.submit_message=function(t){e(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove();var i=e(this.message_container);i.closest("form").length&&(i=i.closest("form")),i.prepend(t),i.removeClass("processing").unblock(),i.find(".input-text, select, input:checkbox").blur(),e("html, body").animate({scrollTop:i.offset().top-100},1e3)},wc_stripe.BaseGateway.prototype.get_first_name=function(t){return e("#"+t+"_first_name").val()},wc_stripe.BaseGateway.prototype.get_last_name=function(t){return e("#"+t+"_last_name").val()},wc_stripe.BaseGateway.prototype.should_save_method=function(){return e("#"+this.gateway_id+"_save_source_key").is(":checked")},wc_stripe.BaseGateway.prototype.is_add_payment_method_page=function(){return e(document.body).hasClass("woocommerce-add-payment-method")},wc_stripe.BaseGateway.prototype.get_selected_payment_method=function(){return e(this.saved_method_selector).val()},wc_stripe.BaseGateway.prototype.needs_shipping=function(){return"1"===this.params.needs_shipping},wc_stripe.BaseGateway.prototype.get_currency=function(){return e("#wc_stripe_currency").val()},wc_stripe.BaseGateway.prototype.get_country=function(){return e("#wc_stripe_country").val()},wc_stripe.BaseGateway.prototype.get_customer_name=function(t){return e(t+"_first_name").val()+" "+e(t+"_last_name").val()},wc_stripe.BaseGateway.prototype.get_customer_email=function(){return e("#billing_email").val()},wc_stripe.BaseGateway.prototype.get_address_field_hash=function(t){for(var i=["_first_name","_last_name","_address_1","_address_2","_postcode","_city","_state","_country"],a="",n=0;n<i.length;n++)a+=e(t+i[n]).val()+"_";return a},wc_stripe.BaseGateway.prototype.block=function(){e.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.BaseGateway.prototype.unblock=function(){e.unblockUI()},wc_stripe.BaseGateway.prototype.get_form=function(){return e(this.token_selector).closest("form")},wc_stripe.BaseGateway.prototype.get_total_price=function(){return e("#wc_stripe_order_total").data("amount")},wc_stripe.BaseGateway.prototype.get_total_price_cents=function(){return e("#wc_stripe_order_total_cents").data("amount")},wc_stripe.BaseGateway.prototype.set_total_price=function(t){e("#wc_stripe_order_total").data("amount",t)},wc_stripe.BaseGateway.prototype.set_total_price_cents=function(t){e("#wc_stripe_order_total_cents").data("amount",t)},wc_stripe.BaseGateway.prototype.set_payment_method=function(t){e('[name="payment_method"][value="'+t+'"]').prop("checked",!0).trigger("click")},wc_stripe.BaseGateway.prototype.set_selected_shipping_methods=function(t){if(t&&e('[name^="shipping_method"]').length)for(var i in t){var a=t[i];e('[name="shipping_method['+i+']"][value="'+a+'"]').prop("checked",!0).trigger("change")}},wc_stripe.BaseGateway.prototype.on_token_received=function(t){this.payment_token_received=!0,e(this.token_selector).val(t.id),this.process_checkout()},wc_stripe.BaseGateway.prototype.createPaymentRequest=function(){this.paymentRequest=i.paymentRequest(this.get_payment_request_options()),this.needs_shipping()&&(this.paymentRequest.on("shippingaddresschange",this.update_shipping_address.bind(this)),this.paymentRequest.on("shippingoptionchange",this.update_shipping_method.bind(this))),this.paymentRequest.on("paymentmethod",this.on_payment_method_received.bind(this))},wc_stripe.BaseGateway.prototype.get_payment_request_options=function(){var t={country:this.params.country_code,currency:this.get_currency().toLowerCase(),total:{amount:this.get_total_price_cents(),label:this.params.total_label,pending:!0},requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:this.needs_shipping()},e=this.get_display_items(),i=this.get_shipping_options();return e&&(t.displayItems=e),this.needs_shipping()&&i&&(t.shippingOptions=i),t},wc_stripe.BaseGateway.prototype.get_payment_request_update=function(t){var i={currency:this.get_currency().toLowerCase(),total:{amount:parseInt(this.get_total_price_cents()),label:this.params.total_label,pending:!0}},a=this.get_display_items(),n=this.get_shipping_options();return a&&(i.displayItems=a),this.needs_shipping()&&n&&(i.shippingOptions=n),t&&(i=e.extend(!0,{},i,t)),i},wc_stripe.BaseGateway.prototype.get_display_items=function(){return e("#wc_stripe_display_items").data("items")},wc_stripe.BaseGateway.prototype.set_display_items=function(t){e("#wc_stripe_display_items").data("items",t)},wc_stripe.BaseGateway.prototype.get_shipping_options=function(){return e("#wc_stripe_shipping_options").data("items")},wc_stripe.BaseGateway.prototype.set_shipping_options=function(t){e("#wc_stripe_shipping_options").data("items",t)},wc_stripe.BaseGateway.prototype.map_address=function(t){return{city:t.city,postcode:t.postalCode,state:t.region,country:t.country}},wc_stripe.BaseGateway.prototype.on_payment_method_received=function(e){try{this.payment_response=e,this.populate_checkout_fields(e),e.complete("success"),this.on_token_received(e.paymentMethod)}catch(e){t.alert(e)}},wc_stripe.BaseGateway.prototype.populate_checkout_fields=function(t){e(this.token_selector).val(t.paymentMethod.id),this.populate_address_fields(t)},wc_stripe.BaseGateway.prototype.populate_address_fields=function(t){var i=this.address_mappings();if(t.payerName&&i.payerName.set(t.payerName),t.payerEmail&&i.payerEmail.set(t.payerEmail),t.payerPhone&&i.payerPhone.set(t.payerPhone),t.shippingAddress){var a=t.shippingAddress;for(var n in a)i[n]&&i[n].set.call(this,a[n],"#shipping")}if(t.paymentMethod.billing_details.address){a=t.paymentMethod.billing_details.address;for(var n in a)i[n]&&i[n].set.call(this,a[n],"#billing")}this.maybe_set_ship_to_different(),e('[name="billing_country"]').trigger("change")},wc_stripe.BaseGateway.prototype.address_mappings=function(){return{payerName:{set:function(t,i){var a=t.split(" ");a.length>0&&e("#billing_first_name").val(a[0]),a.length>1&&e("#billing_last_name").val(a[1])},get:function(t){return e("#billing_first_name").val()+" "+e("#billing_last_name").val()}},payerEmail:{set:function(t){e("#billing_email").val(t)},get:function(){return e("#billing_email").val()}},payerPhone:{set:function(t){e("#billing_phone").val(t)},get:function(){return e("#billing_phone").val()}},recipient:{set:function(t,i){var a=t.split(" ");a.length>0&&e(i+"_first_name").val(a[0]),a.length>1&&e(i+"_last_name").val(a[1])},get:function(t){return e(t+"_first_name").val()+" "+e(t+"_last_name").val()}},country:{set:function(t,i){e(i+"_country").val(t)},get:function(t){return e(t+"_country").val()}},addressLine:{set:function(t,i){t.length>0&&e(i+"_address_1").val(t[0]),t.length>1&&e(i+"_address_2").val(t[1])},get:function(t){return[e(t+"_address_1").val(),e(t+"_address_2").val()]}},line1:{set:function(t,i){e(i+"_address_1").val(t)},get:function(t){return e(t+"_address_1").val()}},line2:{set:function(t,i){e(i+"_address_2").val(t)},get:function(t){return e(t+"_address_2").val()}},region:{set:function(t,i){e(i+"_state").val(t)},get:function(t){e(t+"_state").val()}},state:{set:function(t,i){e(i+"_state").val(t)},get:function(t){e(t+"_state").val()}},city:{set:function(t,i){e(i+"_city").val(t)},get:function(t){e(t+"_city").val()}},postalCode:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){e(t+"_postcode").val()}},postal_code:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){e(t+"_postcode").val()}}}},wc_stripe.BaseGateway.prototype.process_checkout=function(){return new Promise(function(i,a){this.block(),e.ajax({url:this.params.routes.checkout,method:"POST",dataType:"json",data:e.extend({},this.serialize_form(this.get_form()),{payment_method:this.gateway_id,page_id:this.get_page()}),beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.reload?t.location.reload():"success"===e.result?t.location=e.redirect:(e.messages&&this.submit_error(e.messages),this.unblock())}.bind(this)).fail(function(t,e,i){this.unblock(),this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.serialize_form=function(t){var i=t.find("input").filter(function(t,i){return!e(i).is('[name^="add-to-cart"]')}.bind(this)).serializeArray(),a={};for(var n in i){var s=i[n];a[s.name]=s.value}return a.payment_method=this.gateway_id,a},wc_stripe.BaseGateway.prototype.map_shipping_methods=function(t){var e={};if("default"!==t){var i=t.match(/^(\d):(.+)$/);i.length>1&&(e[i[1]]=i[2])}return e},wc_stripe.BaseGateway.prototype.maybe_set_ship_to_different=function(){e('[name="ship_to_different_address"]').length&&e('[name="ship_to_different_address"]').prop("checked",this.get_address_field_hash("#billing")!==this.get_address_field_hash("#shipping")).trigger("change")},wc_stripe.BaseGateway.prototype.update_shipping_address=function(t){return new Promise(function(i,a){e.ajax({url:this.params.routes.shipping_address,method:"POST",dataType:"json",data:{address:this.map_address(t.shippingAddress),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.code?(t.updateWith(e.data.newData),a(e.data)):(t.updateWith(e.data.newData),i(e.data))}.bind(this)).fail(function(t,e,i){}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.update_shipping_method=function(t){return new Promise(function(i,a){e.ajax({url:this.params.routes.shipping_method,method:"POST",dataType:"json",data:{shipping_methods:this.map_shipping_methods(t.shippingOption.id),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.code?(t.updateWith(e.data.newData),a(e.data)):(this.set_selected_shipping_methods(e.data.shipping_methods),t.updateWith(e.data.newData),i(e.data))}.bind(this)).fail(function(t,e,i){this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.CheckoutGateway=function(){this.container=this.message_container="li.payment_method_"+this.gateway_id,this.banner_container="li.banner_payment_method_"+this.gateway_id,e(document.body).on("update_checkout",this.update_checkout.bind(this)),e(document.body).on("updated_checkout",this.updated_checkout.bind(this)),e(document.body).on("checkout_error",this.checkout_error.bind(this)),e(this.token_selector).closest("form").on("checkout_place_order_"+this.gateway_id,this.checkout_place_order.bind(this)),e(document.body).on("wc_stripe_new_method_"+this.gateway_id,this.on_show_new_methods.bind(this)),e(document.body).on("wc_stripe_saved_method_"+this.gateway_id,this.on_show_saved_methods.bind(this)),e(document.body).on("wc_stripe_payment_method_selected",this.on_payment_method_selected.bind(this)),this.banner_enabled()&&e(".woocommerce-billing-fields").length&&e(".wc-stripe-banner-checkout").css("max-width",e(".woocommerce-billing-fields").outerWidth(!0)),this.order_review()},wc_stripe.CheckoutGateway.prototype.order_review=function(){var e=t.location.href.match(/order_review.+payment_method=([\w]+).+payment_nonce=(.+)/);if(e&&e.length>1){var i=e[1],a=e[2];this.gateway_id===i&&(this.payment_token_received=!0,this.set_nonce(a),this.set_use_new_option(!0))}},wc_stripe.CheckoutGateway.prototype.updated_checkout=function(){},wc_stripe.CheckoutGateway.prototype.update_checkout=function(){},wc_stripe.CheckoutGateway.prototype.checkout_error=function(){this.has_checkout_error()&&(this.payment_token_received=!1,this.payment_response=null,this.show_payment_button(),this.hide_place_order())},wc_stripe.CheckoutGateway.prototype.is_valid_checkout=function(){return!(e('[name="terms"]').length&&!e('[name="terms"]').is(":checked"))},wc_stripe.CheckoutGateway.prototype.get_payment_method=function(){return e('[name="payment_method"]:checked').val()},wc_stripe.CheckoutGateway.prototype.set_use_new_option=function(t){e("#"+this.gateway_id+"_use_new").prop("checked",t).trigger("change")},wc_stripe.CheckoutGateway.prototype.checkout_place_order=function(){return this.is_valid_checkout()?!!this.is_saved_method_selected()||this.payment_token_received:(this.submit_error(this.params.messages.terms),!1)},wc_stripe.CheckoutGateway.prototype.on_token_received=function(t){this.payment_token_received=!0,e(this.token_selector).val(t.id),this.hide_payment_button(),this.show_place_order()},wc_stripe.CheckoutGateway.prototype.block=function(){e("form.checkout").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.CheckoutGateway.prototype.unblock=function(){e("form.checkout").unblock()},wc_stripe.CheckoutGateway.prototype.hide_place_order=function(){e("#place_order").addClass("wc-stripe-hide")},wc_stripe.CheckoutGateway.prototype.show_place_order=function(){e("#place_order").removeClass("wc-stripe-hide")},wc_stripe.CheckoutGateway.prototype.on_show_new_methods=function(){this.payment_token_received?(this.show_place_order(),this.hide_payment_button()):(this.hide_place_order(),this.show_payment_button())},wc_stripe.CheckoutGateway.prototype.on_show_saved_methods=function(){this.hide_payment_button(),this.show_place_order()},wc_stripe.CheckoutGateway.prototype.show_payment_button=function(){this.$button&&this.$button.show()},wc_stripe.CheckoutGateway.prototype.hide_payment_button=function(){this.$button&&this.$button.hide()},wc_stripe.CheckoutGateway.prototype.trigger_payment_method_selected=function(){this.on_payment_method_selected(null,e('[name="payment_method"]:checked').val())},wc_stripe.CheckoutGateway.prototype.on_payment_method_selected=function(t,e){e===this.gateway_id?this.payment_token_received||this.is_saved_method_selected()?(this.hide_payment_button(),this.show_place_order()):(this.show_payment_button(),this.hide_place_order()):(this.hide_payment_button(),e.indexOf("stripe_")<0&&this.show_place_order())},wc_stripe.CheckoutGateway.prototype.banner_enabled=function(){return"1"===this.params.banner_enabled},wc_stripe.CheckoutGateway.prototype.checkout_fields_valid=function(){if("undefined"==typeof wc_stripe_checkout_fields)return!0;var t=Object.keys(wc_stripe_checkout_fields.billing),i=Object.keys(wc_stripe_checkout_fields.shipping);function a(t,i){for(var a=0;a<t.length;a++){if(i[t[a]].required){var n=e("#"+t[a]).val();if(void 0===n||0==n.length)return void(valid=!1)}}}return valid=!0,a(t,wc_stripe_checkout_fields.billing),this.needs_shipping()&&e("#ship-to-different-address-checkbox").is(":checked")&&a(i,wc_stripe_checkout_fields.shipping),valid=this.is_valid_checkout(),valid},wc_stripe.ProductGateway=function(){this.container="li.payment_method_"+this.gateway_id,this.message_container="div.product",e(document.body).on("wc_stripe_updated_rest_nonce",this.set_rest_nonce.bind(this)),e("form.cart").on("found_variation",this.found_variation.bind(this)),e("form.cart").on("reset_data",this.reset_variation_data.bind(this)),this.buttonWidth=e("div.quantity").outerWidth(!0)+e(".single_add_to_cart_button").outerWidth(),e(this.container).css("max-width",this.buttonWidth+"px")},wc_stripe.ProductGateway.prototype.get_quantity=function(){return parseInt(e('[name="quantity"]').val())},wc_stripe.ProductGateway.prototype.set_rest_nonce=function(t,e){this.params.rest_nonce=e},wc_stripe.ProductGateway.prototype.found_variation=function(t,e){var i=this.get_product_data();i.price=e.display_price,i.needs_shipping=!e.is_virtual,i.variation=e,this.set_product_data(i),this.enable_payment_button()},wc_stripe.ProductGateway.prototype.reset_variation_data=function(){this.disable_payment_button()},wc_stripe.ProductGateway.prototype.disable_payment_button=function(){this.$button&&this.get_button().prop("disabled",!0).addClass("disabled")},wc_stripe.ProductGateway.prototype.enable_payment_button=function(){this.$button&&this.get_button().prop("disabled",!1).removeClass("disabled")},wc_stripe.ProductGateway.prototype.get_button=function(){return this.$button},wc_stripe.ProductGateway.prototype.is_variable_product=function(){return e('[name="variation_id"]').length>0},wc_stripe.ProductGateway.prototype.needs_shipping=function(){return this.get_product_data().needs_shipping},wc_stripe.ProductGateway.prototype.get_product_data=function(){return e("#wc_stripe_product_data").data("product")},wc_stripe.ProductGateway.prototype.set_product_data=function(t){e("#wc_stripe_product_data").data("product",t)},wc_stripe.ProductGateway.prototype.add_to_cart=function(){return new Promise(function(t,i){this.block(),e.ajax({url:this.params.routes.add_to_cart,method:"POST",dataType:"json",data:{product_id:e("#product_id").val(),variation_id:this.is_variable_product()?e('[name="variation_id"]').val():0,qty:e('[name="quantity"]').val(),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(a,n,s){this.unblock(),e(document.body).triggerHandler("wc_stripe_updated_rest_nonce",s.getResponseHeader("X-WP-Nonce")),a.code?(this.submit_error(a.message),i(a)):(this.set_total_price(a.data.total),this.set_total_price_cents(a.data.totalCents),this.set_display_items(a.data.displayItems),t(a.data))}.bind(this)).fail(function(t,e,i){this.unblock(),this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.ProductGateway.prototype.cart_calculation=function(t){return new Promise(function(i,a){e.ajax({url:this.params.routes.cart_calculation,method:"POST",dataType:"json",data:{product_id:e("#product_id").val(),variation_id:this.is_variable_product()&&t?t:0,qty:e('[name="quantity"]').val(),payment_method:this.gateway_id},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(t,a,n){e(document.body).triggerHandler("wc_stripe_updated_rest_nonce",n.getResponseHeader("X-WP-Nonce")),t.code?this.cart_calculation_error=!0:(this.set_total_price(t.data.total),this.set_total_price_cents(t.data.totalCents),this.set_display_items(t.data.displayItems),i(t.data))}.bind(this)).fail(function(t,e,i){}.bind(this))}.bind(this))},wc_stripe.CartGateway=function(){this.container="li.payment_method_"+this.gateway_id,this.message_container="div.woocommerce",e(document.body).on("updated_wc_div",this.updated_html.bind(this)),e(document.body).on("updated_cart_totals",this.updated_html.bind(this))},wc_stripe.CartGateway.prototype.needs_shipping=function(){return 1===e("#wc_stripe_needs_shipping").data("value")},wc_stripe.CartGateway.prototype.submit_error=function(t){this.submit_message(this.get_error_message(t))},wc_stripe.CartGateway.prototype.updated_html=function(t){},wc_stripe.CartGateway.prototype.add_cart_totals_class=function(){e(".cart_totals").addClass("stripe_cart_gateway_active")},wc_stripe.GooglePay=function(){};const a={apiVersion:2,apiVersionMinor:0},n={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]}};wc_stripe.GooglePay.prototype.address_mappings=function(t){return{name:{set:function(t,i){var a=t.split(" ");e(i+"_first_name").val(a[0]),e(i+"_last_name").val(a[1])},get:function(t){return e(t+"_first_name").val()+e(t+"_last_name").val()}},postalCode:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){return e(t+"_postcode").val()}},countryCode:{set:function(t,i){e(i+"_country").val(t)},get:function(t){return e(t+"_country").val()}},phoneNumber:{set:function(t,i){e("#billing_phone").val(t)},get:function(){return"#billing_phone".val()}},address1:{set:function(t,i){e(i+"_address_1").val(t)},get:function(t){return e(t+"_address_1").val()}},address2:{set:function(t,i){e(i+"_address_2").val(t)},get:function(t){return e(t+"_address_2").val()}},locality:{set:function(t,i){e(i+"_city").val(t)},get:function(t){return e(t+"_city").val()}},administrativeArea:{set:function(t,i){e(i+"_state").val(t)},get:function(t){return e(t+"_state").val()}}}},wc_stripe.GooglePay.prototype.serialize_form=function(t){return e.extend({},wc_stripe.BaseGateway.prototype.serialize_form.apply(this,arguments),{order_review:!this.dynamic_price_enabled()})},wc_stripe.GooglePay.prototype.populate_address_fields=function(t){var i=t.paymentMethodData.info.billingAddress,a=this.address_mappings();for(var n in i)a[n]&&a[n].set.call(this,i[n],"#billing");if(t.shippingAddress)for(var n in t.shippingAddress)a[n]&&a[n].set.call(this,t.shippingAddress[n],"#shipping");t.email&&e("#billing_email").val(t.email),this.maybe_set_ship_to_different(),e('[name="billing_country"]').trigger("change")},wc_stripe.GooglePay.prototype.map_address=function(t){return{city:t.locality,postcode:t.postalCode,state:t.administrativeArea,country:t.countryCode}},wc_stripe.GooglePay.prototype.update_payment_data=function(t){return new Promise(function(i,a){e.when(e.ajax({url:this.params.routes.payment_data,dataType:"json",method:"POST",data:{shipping_address:this.map_address(t.shippingAddress),shipping_methods:this.map_shipping_methods(t.shippingOptionData.id),shipping_method_id:t.shippingOptionData.id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)})).done(function(t){t.code?a(t.data.data):i(t.data)}.bind(this)).fail(function(){a()}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.on_payment_data_changed=function(t){return new Promise(function(e,i){this.update_payment_data(t).then(function(i){e(i.paymentRequestUpdate),this.set_selected_shipping_methods(i.shipping_methods),this.payment_data_updated(i,t)}.bind(this)).catch(function(t){e(t)}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.payment_data_updated=function(t){},wc_stripe.GooglePay.prototype.get_googlepay_display_items=function(){return e("#googlepay_display_items").data("items")},wc_stripe.GooglePay.prototype.set_googlepay_display_items=function(t){e("#googlepay_display_items").data("items",t)},wc_stripe.GooglePay.prototype.get_shipping_options=function(){return e("#googlepay_shipping_options").data("items")},wc_stripe.GooglePay.prototype.get_merchant_info=function(){var t={merchantId:this.params.merchant_id,merchantName:this.params.merchant_name};return"TEST"===this.params.environment&&delete t.merchantId,t},wc_stripe.GooglePay.prototype.dynamic_price_enabled=function(){return"1"===this.params.dynamic_price},wc_stripe.GooglePay.prototype.get_payment_options=function(){var t={environment:this.params.environment,merchantInfo:this.get_merchant_info()};return this.dynamic_price_enabled()&&(this.needs_shipping()&&this.get_total_price_cents()>0?t.paymentDataCallbacks={onPaymentDataChanged:this.on_payment_data_changed.bind(this),onPaymentAuthorized:function(t){return new Promise(function(t,e){t({transactionState:"SUCCESS"})}.bind(this))}.bind(this)}:t.paymentDataCallbacks={onPaymentAuthorized:function(t){return new Promise(function(t,e){t({transactionState:"SUCCESS"})}.bind(this))}}),t},wc_stripe.GooglePay.prototype.build_payment_request=function(){var t=e.extend({},a,{emailRequired:!0,merchantInfo:this.get_merchant_info(),allowedPaymentMethods:[e.extend({type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"stripe","stripe:version":"2018-10-31","stripe:publishableKey":this.params.api_key}}},n)],shippingAddressRequired:this.needs_shipping()&&this.get_total_price_cents()>0,transactionInfo:{currencyCode:this.get_currency(),totalPriceStatus:"ESTIMATED",totalPrice:this.get_total_price().toString(),displayItems:this.get_googlepay_display_items(),totalPriceLabel:this.params.total_price_label}});return t.allowedPaymentMethods[0].parameters.billingAddressRequired=!0,t.allowedPaymentMethods[0].parameters.billingAddressParameters={format:"FULL",phoneNumberRequired:e("#billing_phone").length>0},this.dynamic_price_enabled()&&(this.needs_shipping()&&this.get_total_price_cents()>0?(t.shippingAddressParameters={},t.shippingOptionRequired=!0,t.shippingOptionParameters={shippingOptions:this.get_shipping_options()},t.callbackIntents=["SHIPPING_ADDRESS","SHIPPING_OPTION","PAYMENT_AUTHORIZATION"]):t.callbackIntents=["PAYMENT_AUTHORIZATION"]),t},wc_stripe.GooglePay.prototype.createPaymentsClient=function(){this.paymentsClient=new google.payments.api.PaymentsClient(this.get_payment_options())},wc_stripe.GooglePay.prototype.isReadyToPay=function(){return new Promise(function(t){var i=e.extend({},a);i.allowedPaymentMethods=[n],this.paymentsClient.isReadyToPay(i).then(function(){this.can_pay=!0,this.create_button(),t()}.bind(this)).catch(function(t){this.submit_error(t)}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.create_button=function(){this.$button&&this.$button.remove(),this.$button=e(this.paymentsClient.createButton({onClick:this.start.bind(this),buttonColor:this.params.button_color,buttonType:this.params.button_style})),this.$button.addClass("gpay-button-container")},wc_stripe.GooglePay.prototype.start=function(){this.createPaymentsClient(),this.paymentsClient.loadPaymentData(this.build_payment_request()).then(function(t){var e=JSON.parse(t.paymentMethodData.tokenizationData.token);this.populate_address_fields(t),this.on_token_received(e)}.bind(this)).catch(function(t){"CANCELED"!==t.statusCode&&(t.statusMessage&&t.statusMessage.indexOf("paymentDataRequest.callbackIntent")>-1?this.submit_error_code("DEVELOPER_ERROR_WHITELIST"):this.submit_error(t.statusMessage))}.bind(this))},wc_stripe.ApplePay=function(){},wc_stripe.ApplePay.prototype.initialize=function(){e(document.body).on("click",".apple-pay-button",this.start.bind(this)),this.createPaymentRequest(),this.canMakePayment()},wc_stripe.ApplePay.prototype.create_button=function(){this.$button&&this.$button.remove(),this.$button=e(this.params.button),this.append_button()},wc_stripe.ApplePay.prototype.canMakePayment=function(){return new Promise(function(t,i){this.paymentRequest.canMakePayment().then(function(i){i&&i.applePay&&(this.can_pay=!0,this.create_button(),e(this.container).show(),t(i))}.bind(this))}.bind(this))},wc_stripe.ApplePay.prototype.start=function(t){t.preventDefault(),this.paymentRequest.update(this.get_payment_request_update({total:{pending:!1}})),this.paymentRequest.show()},wc_stripe.PaymentRequest=function(){},wc_stripe.PaymentRequest.prototype.initialize=function(){this.createPaymentRequest(),this.canMakePayment(),this.paymentRequestButton=this.createPaymentRequestButton(),this.paymentRequestButton.on("click",this.button_click.bind(this))},wc_stripe.PaymentRequest.prototype.button_click=function(t){},wc_stripe.PaymentRequest.prototype.createPaymentRequestButton=function(){return this.elements.create("paymentRequestButton",{paymentRequest:this.paymentRequest,style:{paymentRequestButton:{type:this.params.button.type,theme:this.params.button.theme,height:this.params.button.height}}})},wc_stripe.PaymentRequest.prototype.canMakePayment=function(){return new Promise(function(t,i){this.paymentRequest.canMakePayment().then(function(i){i&&!i.applePay&&(this.can_pay=!0,this.create_button(),e(this.container).show(),t(i))}.bind(this))}.bind(this))},wc_stripe.PaymentRequest.prototype.create_button=function(){this.paymentRequestButton.mount("#wc-stripe-payment-request-container")}}(window,jQuery);
|
1 |
+
!function(t,e){t.wc_stripe={};var i=null;wc_stripe.BaseGateway=function(t){this.params=t,this.gateway_id=this.params.gateway_id,this.token_selector=this.params.token_selector,this.saved_method_selector=this.params.saved_method_selector,this.payment_intent_selector=this.params.payment_intent_selector,this.payment_token_received=!1,this.stripe=i,this.elements=i.elements(e.extend({},{locale:"auto"},this.get_element_options())),this.initialize()},wc_stripe.BaseGateway.prototype.get_page=function(){return wc_stripe_params_v3.page},wc_stripe.BaseGateway.prototype.set_nonce=function(t){e(this.token_selector).val(t)},wc_stripe.BaseGateway.prototype.get_element_options=function(){return{}},wc_stripe.BaseGateway.prototype.initialize=function(){},wc_stripe.BaseGateway.prototype.create_button=function(){},wc_stripe.BaseGateway.prototype.is_gateway_selected=function(){return e('[name="payment_method"]:checked').val()===this.gateway_id},wc_stripe.BaseGateway.prototype.is_saved_method_selected=function(){return this.is_gateway_selected()&&"saved"===e('[name="'+this.gateway_id+'_payment_type_key"]:checked').val()},wc_stripe.BaseGateway.prototype.has_checkout_error=function(){return e("#wc_stripe_checkout_error").length>0&&this.is_gateway_selected()},wc_stripe.BaseGateway.prototype.submit_error=function(t){-1==(t=this.get_error_message(t)).indexOf("</ul>")&&(t='<div class="woocommerce-error">'+t+"</div>"),this.submit_message(t)},wc_stripe.BaseGateway.prototype.submit_error_code=function(t){},wc_stripe.BaseGateway.prototype.get_error_message=function(t){return"object"==typeof t&&t.code&&(t=wc_stripe_messages[t.code]?wc_stripe_messages[t.code]:t.message),t},wc_stripe.BaseGateway.prototype.submit_message=function(t){e(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove();var i=e(this.message_container);i.closest("form").length&&(i=i.closest("form")),i.prepend(t),i.removeClass("processing").unblock(),i.find(".input-text, select, input:checkbox").blur(),e("html, body").animate({scrollTop:i.offset().top-100},1e3)},wc_stripe.BaseGateway.prototype.get_first_name=function(t){return e("#"+t+"_first_name").val()},wc_stripe.BaseGateway.prototype.get_last_name=function(t){return e("#"+t+"_last_name").val()},wc_stripe.BaseGateway.prototype.should_save_method=function(){return e("#"+this.gateway_id+"_save_source_key").is(":checked")},wc_stripe.BaseGateway.prototype.is_add_payment_method_page=function(){return e(document.body).hasClass("woocommerce-add-payment-method")},wc_stripe.BaseGateway.prototype.get_selected_payment_method=function(){return e(this.saved_method_selector).val()},wc_stripe.BaseGateway.prototype.needs_shipping=function(){return"1"===this.params.needs_shipping},wc_stripe.BaseGateway.prototype.get_currency=function(){return e("#wc_stripe_currency").val()},wc_stripe.BaseGateway.prototype.get_country=function(){return e("#wc_stripe_country").val()},wc_stripe.BaseGateway.prototype.get_customer_name=function(t){return e(t+"_first_name").val()+" "+e(t+"_last_name").val()},wc_stripe.BaseGateway.prototype.get_customer_email=function(){return e("#billing_email").val()},wc_stripe.BaseGateway.prototype.get_address_field_hash=function(t){for(var i=["_first_name","_last_name","_address_1","_address_2","_postcode","_city","_state","_country"],a="",n=0;n<i.length;n++)a+=e(t+i[n]).val()+"_";return a},wc_stripe.BaseGateway.prototype.block=function(){e.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.BaseGateway.prototype.unblock=function(){e.unblockUI()},wc_stripe.BaseGateway.prototype.get_form=function(){return e(this.token_selector).closest("form")},wc_stripe.BaseGateway.prototype.get_total_price=function(){return e("#wc_stripe_order_total").data("amount")},wc_stripe.BaseGateway.prototype.get_total_price_cents=function(){return e("#wc_stripe_order_total_cents").data("amount")},wc_stripe.BaseGateway.prototype.set_total_price=function(t){e("#wc_stripe_order_total").data("amount",t)},wc_stripe.BaseGateway.prototype.set_total_price_cents=function(t){e("#wc_stripe_order_total_cents").data("amount",t)},wc_stripe.BaseGateway.prototype.set_payment_method=function(t){e('[name="payment_method"][value="'+t+'"]').prop("checked",!0).trigger("click")},wc_stripe.BaseGateway.prototype.set_selected_shipping_methods=function(t){if(t&&e('[name^="shipping_method"]').length)for(var i in t){var a=t[i];e('[name="shipping_method['+i+']"][value="'+a+'"]').prop("checked",!0).trigger("change")}},wc_stripe.BaseGateway.prototype.on_token_received=function(t){this.payment_token_received=!0,e(this.token_selector).val(t.id),this.process_checkout()},wc_stripe.BaseGateway.prototype.createPaymentRequest=function(){this.paymentRequest=i.paymentRequest(this.get_payment_request_options()),this.needs_shipping()&&(this.paymentRequest.on("shippingaddresschange",this.update_shipping_address.bind(this)),this.paymentRequest.on("shippingoptionchange",this.update_shipping_method.bind(this))),this.paymentRequest.on("paymentmethod",this.on_payment_method_received.bind(this))},wc_stripe.BaseGateway.prototype.get_payment_request_options=function(){var t={country:this.params.country_code,currency:this.get_currency().toLowerCase(),total:{amount:this.get_total_price_cents(),label:this.params.total_label,pending:!0},requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:this.needs_shipping()},e=this.get_display_items(),i=this.get_shipping_options();return e&&(t.displayItems=e),this.needs_shipping()&&i&&(t.shippingOptions=i),t},wc_stripe.BaseGateway.prototype.get_payment_request_update=function(t){var i={currency:this.get_currency().toLowerCase(),total:{amount:parseInt(this.get_total_price_cents()),label:this.params.total_label,pending:!0}},a=this.get_display_items(),n=this.get_shipping_options();return a&&(i.displayItems=a),this.needs_shipping()&&n&&(i.shippingOptions=n),t&&(i=e.extend(!0,{},i,t)),i},wc_stripe.BaseGateway.prototype.get_display_items=function(){return e("#wc_stripe_display_items").data("items")},wc_stripe.BaseGateway.prototype.set_display_items=function(t){e("#wc_stripe_display_items").data("items",t)},wc_stripe.BaseGateway.prototype.get_shipping_options=function(){return e("#wc_stripe_shipping_options").data("items")},wc_stripe.BaseGateway.prototype.set_shipping_options=function(t){e("#wc_stripe_shipping_options").data("items",t)},wc_stripe.BaseGateway.prototype.map_address=function(t){return{city:t.city,postcode:t.postalCode,state:t.region,country:t.country}},wc_stripe.BaseGateway.prototype.on_payment_method_received=function(e){try{this.payment_response=e,this.populate_checkout_fields(e),e.complete("success"),this.on_token_received(e.paymentMethod)}catch(e){t.alert(e)}},wc_stripe.BaseGateway.prototype.populate_checkout_fields=function(t){e(this.token_selector).val(t.paymentMethod.id),this.populate_address_fields(t)},wc_stripe.BaseGateway.prototype.populate_address_fields=function(t){var i=this.address_mappings();if(t.payerName&&i.payerName.set(t.payerName),t.payerEmail&&i.payerEmail.set(t.payerEmail),t.payerPhone&&i.payerPhone.set(t.payerPhone),t.shippingAddress){var a=t.shippingAddress;for(var n in a)i[n]&&i[n].set.call(this,a[n],"#shipping")}if(t.paymentMethod.billing_details.address){a=t.paymentMethod.billing_details.address;for(var n in a)i[n]&&i[n].set.call(this,a[n],"#billing")}this.maybe_set_ship_to_different(),e('[name="billing_country"]').trigger("change")},wc_stripe.BaseGateway.prototype.address_mappings=function(){return{payerName:{set:function(t,i){var a=t.split(" ");a.length>0&&e("#billing_first_name").val(a[0]),a.length>1&&e("#billing_last_name").val(a[1])},get:function(t){return e("#billing_first_name").val()+" "+e("#billing_last_name").val()}},payerEmail:{set:function(t){e("#billing_email").val(t)},get:function(){return e("#billing_email").val()}},payerPhone:{set:function(t){e("#billing_phone").val(t)},get:function(){return e("#billing_phone").val()}},recipient:{set:function(t,i){var a=t.split(" ");a.length>0&&e(i+"_first_name").val(a[0]),a.length>1&&e(i+"_last_name").val(a[1])},get:function(t){return e(t+"_first_name").val()+" "+e(t+"_last_name").val()}},country:{set:function(t,i){e(i+"_country").val(t)},get:function(t){return e(t+"_country").val()}},addressLine:{set:function(t,i){t.length>0&&e(i+"_address_1").val(t[0]),t.length>1&&e(i+"_address_2").val(t[1])},get:function(t){return[e(t+"_address_1").val(),e(t+"_address_2").val()]}},line1:{set:function(t,i){e(i+"_address_1").val(t)},get:function(t){return e(t+"_address_1").val()}},line2:{set:function(t,i){e(i+"_address_2").val(t)},get:function(t){return e(t+"_address_2").val()}},region:{set:function(t,i){e(i+"_state").val(t)},get:function(t){e(t+"_state").val()}},state:{set:function(t,i){e(i+"_state").val(t)},get:function(t){e(t+"_state").val()}},city:{set:function(t,i){e(i+"_city").val(t)},get:function(t){e(t+"_city").val()}},postalCode:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){e(t+"_postcode").val()}},postal_code:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){e(t+"_postcode").val()}}}},wc_stripe.BaseGateway.prototype.process_checkout=function(){return new Promise(function(i,a){this.block(),e.ajax({url:this.params.routes.checkout,method:"POST",dataType:"json",data:e.extend({},this.serialize_form(this.get_form()),{payment_method:this.gateway_id,page_id:this.get_page()}),beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.reload?t.location.reload():"success"===e.result?t.location=e.redirect:(e.messages&&this.submit_error(e.messages),this.unblock())}.bind(this)).fail(function(t,e,i){this.unblock(),this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.serialize_form=function(t){var i=t.find("input").filter(function(t,i){return!e(i).is('[name^="add-to-cart"]')}.bind(this)).serializeArray(),a={};for(var n in i){var s=i[n];a[s.name]=s.value}return a.payment_method=this.gateway_id,a},wc_stripe.BaseGateway.prototype.map_shipping_methods=function(t){var e={};if("default"!==t){var i=t.match(/^(\d):(.+)$/);i.length>1&&(e[i[1]]=i[2])}return e},wc_stripe.BaseGateway.prototype.maybe_set_ship_to_different=function(){e('[name="ship_to_different_address"]').length&&e('[name="ship_to_different_address"]').prop("checked",this.get_address_field_hash("#billing")!==this.get_address_field_hash("#shipping")).trigger("change")},wc_stripe.BaseGateway.prototype.update_shipping_address=function(t){return new Promise(function(i,a){e.ajax({url:this.params.routes.shipping_address,method:"POST",dataType:"json",data:{address:this.map_address(t.shippingAddress),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.code?(t.updateWith(e.data.newData),a(e.data)):(t.updateWith(e.data.newData),i(e.data))}.bind(this)).fail(function(t,e,i){}.bind(this))}.bind(this))},wc_stripe.BaseGateway.prototype.update_shipping_method=function(t){return new Promise(function(i,a){e.ajax({url:this.params.routes.shipping_method,method:"POST",dataType:"json",data:{shipping_methods:this.map_shipping_methods(t.shippingOption.id),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(e){e.code?(t.updateWith(e.data.newData),a(e.data)):(this.set_selected_shipping_methods(e.data.shipping_methods),t.updateWith(e.data.newData),i(e.data))}.bind(this)).fail(function(t,e,i){this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.CheckoutGateway=function(){this.container=this.message_container="li.payment_method_"+this.gateway_id,this.banner_container="li.banner_payment_method_"+this.gateway_id,e(document.body).on("update_checkout",this.update_checkout.bind(this)),e(document.body).on("updated_checkout",this.updated_checkout.bind(this)),e(document.body).on("checkout_error",this.checkout_error.bind(this)),e(this.token_selector).closest("form").on("checkout_place_order_"+this.gateway_id,this.checkout_place_order.bind(this)),e(document.body).on("wc_stripe_new_method_"+this.gateway_id,this.on_show_new_methods.bind(this)),e(document.body).on("wc_stripe_saved_method_"+this.gateway_id,this.on_show_saved_methods.bind(this)),e(document.body).on("wc_stripe_payment_method_selected",this.on_payment_method_selected.bind(this)),this.banner_enabled()&&e(".woocommerce-billing-fields").length&&e(".wc-stripe-banner-checkout").css("max-width",e(".woocommerce-billing-fields").outerWidth(!0)),this.order_review()},wc_stripe.CheckoutGateway.prototype.order_review=function(){var e=t.location.href.match(/order_review.+payment_method=([\w]+).+payment_nonce=(.+)/);if(e&&e.length>1){var i=e[1],a=e[2];this.gateway_id===i&&(this.payment_token_received=!0,this.set_nonce(a),this.set_use_new_option(!0))}},wc_stripe.CheckoutGateway.prototype.updated_checkout=function(){},wc_stripe.CheckoutGateway.prototype.update_checkout=function(){},wc_stripe.CheckoutGateway.prototype.checkout_error=function(){this.has_checkout_error()&&(this.payment_token_received=!1,this.payment_response=null,this.show_payment_button(),this.hide_place_order())},wc_stripe.CheckoutGateway.prototype.is_valid_checkout=function(){return!(e('[name="terms"]').length&&!e('[name="terms"]').is(":checked"))},wc_stripe.CheckoutGateway.prototype.get_payment_method=function(){return e('[name="payment_method"]:checked').val()},wc_stripe.CheckoutGateway.prototype.set_use_new_option=function(t){e("#"+this.gateway_id+"_use_new").prop("checked",t).trigger("change")},wc_stripe.CheckoutGateway.prototype.checkout_place_order=function(){return this.is_valid_checkout()?!!this.is_saved_method_selected()||this.payment_token_received:(this.submit_error(this.params.messages.terms),!1)},wc_stripe.CheckoutGateway.prototype.on_token_received=function(t){this.payment_token_received=!0,e(this.token_selector).val(t.id),this.hide_payment_button(),this.show_place_order()},wc_stripe.CheckoutGateway.prototype.block=function(){e("form.checkout").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},wc_stripe.CheckoutGateway.prototype.unblock=function(){e("form.checkout").unblock()},wc_stripe.CheckoutGateway.prototype.hide_place_order=function(){e("#place_order").addClass("wc-stripe-hide")},wc_stripe.CheckoutGateway.prototype.show_place_order=function(){e("#place_order").removeClass("wc-stripe-hide")},wc_stripe.CheckoutGateway.prototype.on_show_new_methods=function(){this.payment_token_received?(this.show_place_order(),this.hide_payment_button()):(this.hide_place_order(),this.show_payment_button())},wc_stripe.CheckoutGateway.prototype.on_show_saved_methods=function(){this.hide_payment_button(),this.show_place_order()},wc_stripe.CheckoutGateway.prototype.show_payment_button=function(){this.$button&&this.$button.show()},wc_stripe.CheckoutGateway.prototype.hide_payment_button=function(){this.$button&&this.$button.hide()},wc_stripe.CheckoutGateway.prototype.trigger_payment_method_selected=function(){this.on_payment_method_selected(null,e('[name="payment_method"]:checked').val())},wc_stripe.CheckoutGateway.prototype.on_payment_method_selected=function(t,e){e===this.gateway_id?this.payment_token_received||this.is_saved_method_selected()?(this.hide_payment_button(),this.show_place_order()):(this.show_payment_button(),this.hide_place_order()):(this.hide_payment_button(),e.indexOf("stripe_")<0&&this.show_place_order())},wc_stripe.CheckoutGateway.prototype.banner_enabled=function(){return"1"===this.params.banner_enabled},wc_stripe.CheckoutGateway.prototype.checkout_fields_valid=function(){if("undefined"==typeof wc_stripe_checkout_fields)return!0;var t=Object.keys(wc_stripe_checkout_fields.billing),i=Object.keys(wc_stripe_checkout_fields.shipping);function a(t,i){for(var a=0;a<t.length;a++){if(i[t[a]].required){var n=e("#"+t[a]).val();if(void 0===n||0==n.length)return void(valid=!1)}}}return valid=!0,a(t,wc_stripe_checkout_fields.billing),this.needs_shipping()&&e("#ship-to-different-address-checkbox").is(":checked")&&a(i,wc_stripe_checkout_fields.shipping),valid=this.is_valid_checkout(),valid},wc_stripe.ProductGateway=function(){this.container="li.payment_method_"+this.gateway_id,this.message_container="div.product",e(document.body).on("wc_stripe_updated_rest_nonce",this.set_rest_nonce.bind(this)),e("form.cart").on("found_variation",this.found_variation.bind(this)),e("form.cart").on("reset_data",this.reset_variation_data.bind(this)),this.buttonWidth=e("div.quantity").outerWidth(!0)+e(".single_add_to_cart_button").outerWidth(),(marginLeft=e(".single_add_to_cart_button").css("marginLeft"))&&(this.buttonWidth+=parseInt(marginLeft.replace("px",""))),e(this.container).css("max-width",this.buttonWidth+"px")},wc_stripe.ProductGateway.prototype.get_quantity=function(){return parseInt(e('[name="quantity"]').val())},wc_stripe.ProductGateway.prototype.set_rest_nonce=function(t,e){this.params.rest_nonce=e},wc_stripe.ProductGateway.prototype.found_variation=function(t,e){var i=this.get_product_data();i.price=e.display_price,i.needs_shipping=!e.is_virtual,i.variation=e,this.set_product_data(i),this.enable_payment_button()},wc_stripe.ProductGateway.prototype.reset_variation_data=function(){this.disable_payment_button()},wc_stripe.ProductGateway.prototype.disable_payment_button=function(){this.$button&&this.get_button().prop("disabled",!0).addClass("disabled")},wc_stripe.ProductGateway.prototype.enable_payment_button=function(){this.$button&&this.get_button().prop("disabled",!1).removeClass("disabled")},wc_stripe.ProductGateway.prototype.get_button=function(){return this.$button},wc_stripe.ProductGateway.prototype.is_variable_product=function(){return e('[name="variation_id"]').length>0},wc_stripe.ProductGateway.prototype.needs_shipping=function(){return this.get_product_data().needs_shipping},wc_stripe.ProductGateway.prototype.get_product_data=function(){return e("#wc_stripe_product_data").data("product")},wc_stripe.ProductGateway.prototype.set_product_data=function(t){e("#wc_stripe_product_data").data("product",t)},wc_stripe.ProductGateway.prototype.add_to_cart=function(){return new Promise(function(t,i){this.block(),e.ajax({url:this.params.routes.add_to_cart,method:"POST",dataType:"json",data:{product_id:e("#product_id").val(),variation_id:this.is_variable_product()?e('[name="variation_id"]').val():0,qty:e('[name="quantity"]').val(),payment_method:this.gateway_id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(a,n,s){this.unblock(),e(document.body).triggerHandler("wc_stripe_updated_rest_nonce",s.getResponseHeader("X-WP-Nonce")),a.code?(this.submit_error(a.message),i(a)):(this.set_total_price(a.data.total),this.set_total_price_cents(a.data.totalCents),this.set_display_items(a.data.displayItems),t(a.data))}.bind(this)).fail(function(t,e,i){this.unblock(),this.submit_error(i)}.bind(this))}.bind(this))},wc_stripe.ProductGateway.prototype.cart_calculation=function(t){return new Promise(function(i,a){e.ajax({url:this.params.routes.cart_calculation,method:"POST",dataType:"json",data:{product_id:e("#product_id").val(),variation_id:this.is_variable_product()&&t?t:0,qty:e('[name="quantity"]').val(),payment_method:this.gateway_id},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)}).done(function(t,a,n){e(document.body).triggerHandler("wc_stripe_updated_rest_nonce",n.getResponseHeader("X-WP-Nonce")),t.code?this.cart_calculation_error=!0:(this.set_total_price(t.data.total),this.set_total_price_cents(t.data.totalCents),this.set_display_items(t.data.displayItems),i(t.data))}.bind(this)).fail(function(t,e,i){}.bind(this))}.bind(this))},wc_stripe.CartGateway=function(){this.container="li.payment_method_"+this.gateway_id,this.message_container="div.woocommerce",e(document.body).on("updated_wc_div",this.updated_html.bind(this)),e(document.body).on("updated_cart_totals",this.updated_html.bind(this))},wc_stripe.CartGateway.prototype.needs_shipping=function(){return 1===e("#wc_stripe_needs_shipping").data("value")},wc_stripe.CartGateway.prototype.submit_error=function(t){this.submit_message(this.get_error_message(t))},wc_stripe.CartGateway.prototype.updated_html=function(t){},wc_stripe.CartGateway.prototype.add_cart_totals_class=function(){e(".cart_totals").addClass("stripe_cart_gateway_active")},wc_stripe.GooglePay=function(){};const a={apiVersion:2,apiVersionMinor:0},n={type:"CARD",parameters:{allowedAuthMethods:["PAN_ONLY"],allowedCardNetworks:["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]}};wc_stripe.GooglePay.prototype.address_mappings=function(t){return{name:{set:function(t,i){var a=t.split(" ");e(i+"_first_name").val(a[0]),e(i+"_last_name").val(a[1])},get:function(t){return e(t+"_first_name").val()+e(t+"_last_name").val()}},postalCode:{set:function(t,i){e(i+"_postcode").val(t)},get:function(t){return e(t+"_postcode").val()}},countryCode:{set:function(t,i){e(i+"_country").val(t)},get:function(t){return e(t+"_country").val()}},phoneNumber:{set:function(t,i){e("#billing_phone").val(t)},get:function(){return"#billing_phone".val()}},address1:{set:function(t,i){e(i+"_address_1").val(t)},get:function(t){return e(t+"_address_1").val()}},address2:{set:function(t,i){e(i+"_address_2").val(t)},get:function(t){return e(t+"_address_2").val()}},locality:{set:function(t,i){e(i+"_city").val(t)},get:function(t){return e(t+"_city").val()}},administrativeArea:{set:function(t,i){e(i+"_state").val(t)},get:function(t){return e(t+"_state").val()}}}},wc_stripe.GooglePay.prototype.serialize_form=function(t){return e.extend({},wc_stripe.BaseGateway.prototype.serialize_form.apply(this,arguments),{order_review:!this.dynamic_price_enabled()})},wc_stripe.GooglePay.prototype.populate_address_fields=function(t){var i=t.paymentMethodData.info.billingAddress,a=this.address_mappings();for(var n in i)a[n]&&a[n].set.call(this,i[n],"#billing");if(t.shippingAddress)for(var n in t.shippingAddress)a[n]&&a[n].set.call(this,t.shippingAddress[n],"#shipping");t.email&&e("#billing_email").val(t.email),this.maybe_set_ship_to_different(),e('[name="billing_country"]').trigger("change")},wc_stripe.GooglePay.prototype.map_address=function(t){return{city:t.locality,postcode:t.postalCode,state:t.administrativeArea,country:t.countryCode}},wc_stripe.GooglePay.prototype.update_payment_data=function(t){return new Promise(function(i,a){e.when(e.ajax({url:this.params.routes.payment_data,dataType:"json",method:"POST",data:{shipping_address:this.map_address(t.shippingAddress),shipping_methods:this.map_shipping_methods(t.shippingOptionData.id),shipping_method_id:t.shippingOptionData.id,page_id:this.get_page()},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",this.params.rest_nonce)}.bind(this)})).done(function(t){t.code?a(t.data.data):i(t.data)}.bind(this)).fail(function(){a()}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.on_payment_data_changed=function(t){return new Promise(function(e,i){this.update_payment_data(t).then(function(i){e(i.paymentRequestUpdate),this.set_selected_shipping_methods(i.shipping_methods),this.payment_data_updated(i,t)}.bind(this)).catch(function(t){e(t)}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.payment_data_updated=function(t){},wc_stripe.GooglePay.prototype.get_googlepay_display_items=function(){return e("#googlepay_display_items").data("items")},wc_stripe.GooglePay.prototype.set_googlepay_display_items=function(t){e("#googlepay_display_items").data("items",t)},wc_stripe.GooglePay.prototype.get_shipping_options=function(){return e("#googlepay_shipping_options").data("items")},wc_stripe.GooglePay.prototype.get_merchant_info=function(){var t={merchantId:this.params.merchant_id,merchantName:this.params.merchant_name};return"TEST"===this.params.environment&&delete t.merchantId,t},wc_stripe.GooglePay.prototype.dynamic_price_enabled=function(){return"1"===this.params.dynamic_price},wc_stripe.GooglePay.prototype.get_payment_options=function(){var t={environment:this.params.environment,merchantInfo:this.get_merchant_info()};return this.dynamic_price_enabled()&&(this.needs_shipping()&&this.get_total_price_cents()>0?t.paymentDataCallbacks={onPaymentDataChanged:this.on_payment_data_changed.bind(this),onPaymentAuthorized:function(t){return new Promise(function(t,e){t({transactionState:"SUCCESS"})}.bind(this))}.bind(this)}:t.paymentDataCallbacks={onPaymentAuthorized:function(t){return new Promise(function(t,e){t({transactionState:"SUCCESS"})}.bind(this))}}),t},wc_stripe.GooglePay.prototype.build_payment_request=function(){var t=e.extend({},a,{emailRequired:!0,merchantInfo:this.get_merchant_info(),allowedPaymentMethods:[e.extend({type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"stripe","stripe:version":"2018-10-31","stripe:publishableKey":this.params.api_key}}},n)],shippingAddressRequired:this.needs_shipping()&&this.get_total_price_cents()>0,transactionInfo:{currencyCode:this.get_currency(),totalPriceStatus:"ESTIMATED",totalPrice:this.get_total_price().toString(),displayItems:this.get_googlepay_display_items(),totalPriceLabel:this.params.total_price_label}});return t.allowedPaymentMethods[0].parameters.billingAddressRequired=!0,t.allowedPaymentMethods[0].parameters.billingAddressParameters={format:"FULL",phoneNumberRequired:e("#billing_phone").length>0},this.dynamic_price_enabled()&&(this.needs_shipping()&&this.get_total_price_cents()>0?(t.shippingAddressParameters={},t.shippingOptionRequired=!0,t.shippingOptionParameters={shippingOptions:this.get_shipping_options()},t.callbackIntents=["SHIPPING_ADDRESS","SHIPPING_OPTION","PAYMENT_AUTHORIZATION"]):t.callbackIntents=["PAYMENT_AUTHORIZATION"]),t},wc_stripe.GooglePay.prototype.createPaymentsClient=function(){this.paymentsClient=new google.payments.api.PaymentsClient(this.get_payment_options())},wc_stripe.GooglePay.prototype.isReadyToPay=function(){return new Promise(function(t){var i=e.extend({},a);i.allowedPaymentMethods=[n],this.paymentsClient.isReadyToPay(i).then(function(){this.can_pay=!0,this.create_button(),t()}.bind(this)).catch(function(t){this.submit_error(t)}.bind(this))}.bind(this))},wc_stripe.GooglePay.prototype.create_button=function(){this.$button&&this.$button.remove(),this.$button=e(this.paymentsClient.createButton({onClick:this.start.bind(this),buttonColor:this.params.button_color,buttonType:this.params.button_style})),this.$button.addClass("gpay-button-container")},wc_stripe.GooglePay.prototype.start=function(){this.createPaymentsClient(),this.paymentsClient.loadPaymentData(this.build_payment_request()).then(function(t){var e=JSON.parse(t.paymentMethodData.tokenizationData.token);this.populate_address_fields(t),this.on_token_received(e)}.bind(this)).catch(function(t){"CANCELED"!==t.statusCode&&(t.statusMessage&&t.statusMessage.indexOf("paymentDataRequest.callbackIntent")>-1?this.submit_error_code("DEVELOPER_ERROR_WHITELIST"):this.submit_error(t.statusMessage))}.bind(this))},wc_stripe.ApplePay=function(){},wc_stripe.ApplePay.prototype.initialize=function(){e(document.body).on("click",".apple-pay-button",this.start.bind(this)),this.createPaymentRequest(),this.canMakePayment()},wc_stripe.ApplePay.prototype.create_button=function(){this.$button&&this.$button.remove(),this.$button=e(this.params.button),this.append_button()},wc_stripe.ApplePay.prototype.canMakePayment=function(){return new Promise(function(t,i){this.paymentRequest.canMakePayment().then(function(i){i&&i.applePay&&(this.can_pay=!0,this.create_button(),e(this.container).show(),t(i))}.bind(this))}.bind(this))},wc_stripe.ApplePay.prototype.start=function(t){t.preventDefault(),this.paymentRequest.update(this.get_payment_request_update({total:{pending:!1}})),this.paymentRequest.show()},wc_stripe.PaymentRequest=function(){},wc_stripe.PaymentRequest.prototype.initialize=function(){this.createPaymentRequest(),this.canMakePayment(),this.paymentRequestButton=this.createPaymentRequestButton(),this.paymentRequestButton.on("click",this.button_click.bind(this))},wc_stripe.PaymentRequest.prototype.button_click=function(t){},wc_stripe.PaymentRequest.prototype.createPaymentRequestButton=function(){return this.elements.create("paymentRequestButton",{paymentRequest:this.paymentRequest,style:{paymentRequestButton:{type:this.params.button.type,theme:this.params.button.theme,height:this.params.button.height}}})},wc_stripe.PaymentRequest.prototype.canMakePayment=function(){return new Promise(function(t,i){this.paymentRequest.canMakePayment().then(function(i){i&&!i.applePay&&(this.can_pay=!0,this.create_button(),e(this.container).show(),t(i))}.bind(this))}.bind(this))},wc_stripe.PaymentRequest.prototype.create_button=function(){this.paymentRequestButton.mount("#wc-stripe-payment-request-container")};try{i=Stripe(wc_stripe_params_v3.api_key)}catch(e){return t.alert(e),void console.log(e)}}(window,jQuery);
|
i18n/languages/woo-stripe-payment.pot
CHANGED
@@ -1,24 +1,37 @@
|
|
1 |
-
|
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
-
"Project-Id-Version:
|
5 |
-
"
|
6 |
-
"
|
7 |
-
"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: en\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"
|
14 |
-
"
|
15 |
-
"
|
16 |
-
"X-
|
17 |
-
|
18 |
-
|
19 |
-
"
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
#: includes/gateways/settings/ach-settings-v2.php:7
|
23 |
#: includes/gateways/settings/ach-settings.php:7
|
24 |
#: includes/gateways/settings/applepay-settings.php:7
|
@@ -28,12 +41,11 @@ msgstr ""
|
|
28 |
msgid "Enabled"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
32 |
-
#, php-format
|
33 |
msgid "If enabled, your site can accept %s payments through Stripe."
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
37 |
#: includes/gateways/settings/ach-settings-v2.php:58
|
38 |
#: includes/gateways/settings/ach-settings.php:59
|
39 |
#: includes/gateways/settings/applepay-settings.php:13
|
@@ -43,7 +55,7 @@ msgstr ""
|
|
43 |
msgid "General Settings"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
47 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:47
|
48 |
#: includes/gateways/settings/ach-settings-v2.php:61
|
49 |
#: includes/gateways/settings/ach-settings.php:62
|
@@ -54,12 +66,7 @@ msgstr ""
|
|
54 |
msgid "Title"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
58 |
-
#, php-format
|
59 |
-
msgid "Title of the %s gateway"
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:114
|
63 |
#: includes/gateways/settings/ach-settings-v2.php:67
|
64 |
#: includes/gateways/settings/ach-settings.php:68
|
65 |
#: includes/gateways/settings/applepay-settings.php:22
|
@@ -69,7 +76,7 @@ msgstr ""
|
|
69 |
msgid "Description"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
73 |
#: includes/gateways/settings/ach-settings-v2.php:69
|
74 |
#: includes/gateways/settings/ach-settings.php:70
|
75 |
#: includes/gateways/settings/applepay-settings.php:24
|
@@ -79,36 +86,28 @@ msgstr ""
|
|
79 |
msgid "Leave blank if you don't want a description to show for the gateway."
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
83 |
-
#, php-format
|
84 |
msgid "Order %s"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
88 |
-
#, php-format
|
89 |
msgid "Gateway will appear when store currency is <strong>%s</strong>"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:
|
93 |
-
#, php-format
|
94 |
msgid " & billing country is <strong>%s</strong>"
|
95 |
msgstr ""
|
96 |
|
97 |
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:337
|
98 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:114
|
99 |
-
#, php-format
|
100 |
msgid "Error processing payment. Reason: %s"
|
101 |
msgstr ""
|
102 |
|
103 |
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:344
|
104 |
-
|
105 |
-
msgid ""
|
106 |
-
"Charge %s is pending. Payment Method: %s. Payment will be completed once "
|
107 |
-
"charge.succeeded webhook received from Stripe."
|
108 |
msgstr ""
|
109 |
|
110 |
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:352
|
111 |
-
#, php-format
|
112 |
msgid "Order %s successful in Stripe. Charge: %s. Payment Method: %s"
|
113 |
msgstr ""
|
114 |
|
@@ -120,12 +119,7 @@ msgstr ""
|
|
120 |
msgid "authorization"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
124 |
-
msgid ""
|
125 |
-
"Please read and accept the terms and conditions to proceed with your order."
|
126 |
-
msgstr ""
|
127 |
-
|
128 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:393
|
129 |
#: includes/controllers/class-wc-stripe-controller-cart.php:135
|
130 |
#: includes/controllers/class-wc-stripe-controller-cart.php:184
|
131 |
#: includes/controllers/class-wc-stripe-controller-googlepay.php:129
|
@@ -133,132 +127,116 @@ msgstr ""
|
|
133 |
msgid "Total"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
137 |
msgid "User must be logged in."
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
141 |
-
#, php-format
|
142 |
msgid "Error saving your payment method. Reason: %s"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
146 |
-
#, php-format
|
147 |
msgid "Error saving payment method. Reason: %s"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
151 |
-
#, php-format
|
152 |
msgid "Order refunded in Stripe. Amount: %s"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
156 |
-
#, php-format
|
157 |
msgid "Order amount captured in Stripe. Amount: %s"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
161 |
-
#, php-format
|
162 |
msgid "Error capturing charge in Stripe. Reason: %s"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
166 |
-
#, php-format
|
167 |
msgid "Error voiding charge. Reason: %s"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
171 |
msgid "Charge voided in Stripe."
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
175 |
msgid "n/a"
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
179 |
#: includes/admin/meta-boxes/views/html-order-pay.php:42
|
180 |
msgid "New Card"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
184 |
#: includes/admin/meta-boxes/views/html-order-pay.php:30
|
185 |
msgid "Saved Cards"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
189 |
-
#, php-format
|
190 |
msgid "Attemp to save payment method failed. Reason: %s"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
194 |
-
msgid ""
|
195 |
-
"We were not able to save your payment method. To prevent billing issues with "
|
196 |
-
"your subscription, please add a payment method to the subscription."
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
200 |
-
#, php-format
|
201 |
msgid "We were not able to save your payment method. Reason: %s"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
205 |
msgid "Payment Method Token"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
209 |
-
#, php-format
|
210 |
msgid "Recurring payment for order failed. Reason: %s"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
214 |
-
#, php-format
|
215 |
msgid "Recurring payment captured in Stripe. Payment method: %s"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
219 |
-
#, php-format
|
220 |
msgid "Recurring payment authorized in Stripe. Payment method: %s"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
224 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
225 |
-
#, php-format
|
226 |
msgid "Customer must manually complete payment for payment method %s"
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
230 |
-
#, php-format
|
231 |
msgid "Error saving payment method for subscription. Reason: %s"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
235 |
#: includes/abstract/abstract-wc-stripe-payment.php:175
|
236 |
-
#, php-format
|
237 |
msgid "Order %s from %s"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
241 |
-
#, php-format
|
242 |
msgid "Pre-order payment for order failed. Reason: %s"
|
243 |
msgstr ""
|
244 |
|
245 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
246 |
-
#, php-format
|
247 |
msgid "Pre-order payment captured in Stripe. Payment method: %s"
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
251 |
-
#, php-format
|
252 |
msgid "Pre-order payment authorized in Stripe. Payment method: %s"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:
|
256 |
msgid "Cannot process payment"
|
257 |
msgstr ""
|
258 |
|
|
|
|
|
|
|
|
|
259 |
#: includes/abstract/abstract-wc-payment-token-stripe.php:167
|
260 |
#: includes/abstract/abstract-wc-payment-token-stripe.php:173
|
261 |
-
#, php-format
|
262 |
msgid "Error deleting Stripe card. Token Id: %s"
|
263 |
msgstr ""
|
264 |
|
@@ -275,6 +253,7 @@ msgid "Stripe Gateway"
|
|
275 |
msgstr ""
|
276 |
|
277 |
#: includes/admin/class-wc-stripe-admin-menus.php:29
|
|
|
278 |
msgid "Settings"
|
279 |
msgstr ""
|
280 |
|
@@ -289,19 +268,32 @@ msgid "Documentation"
|
|
289 |
msgstr ""
|
290 |
|
291 |
#: includes/admin/class-wc-stripe-admin-notices.php:51
|
292 |
-
#, php-format
|
293 |
msgid ""
|
294 |
-
"At Stripe's request we have updated how the Stripe for WooCommerce\n"
|
295 |
-
"\t\t\t\t\t\t\t\t\tplugin integrates with Stripe. This new integration offers "
|
296 |
-
"
|
297 |
-
"\t\t\t\t\t\t\t\t\tStripe is requesting that all merchants switch. %sUpdate "
|
298 |
-
"Integration%s"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: includes/admin/class-wc-stripe-admin-settings.php:
|
302 |
msgid "Local Gateways"
|
303 |
msgstr ""
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:9
|
306 |
#: includes/admin/views/html-user-profile.php:34
|
307 |
#: includes/admin/views/html-user-profile.php:68
|
@@ -313,7 +305,9 @@ msgid "capture amount"
|
|
313 |
msgstr ""
|
314 |
|
315 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:14
|
|
|
316 |
#: includes/admin/meta-boxes/views/html-order-pay.php:23
|
|
|
317 |
#: includes/gateways/settings/applepay-settings.php:41
|
318 |
#: includes/gateways/settings/cc-settings.php:41
|
319 |
#: includes/gateways/settings/googlepay-settings.php:55
|
@@ -340,12 +334,6 @@ msgstr ""
|
|
340 |
msgid "Live"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:25
|
344 |
-
#: includes/admin/settings/class-wc-stripe-api-settings.php:41
|
345 |
-
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:147
|
346 |
-
msgid "Test"
|
347 |
-
msgstr ""
|
348 |
-
|
349 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:28
|
350 |
msgid "Status"
|
351 |
msgstr ""
|
@@ -371,7 +359,8 @@ msgid "Type"
|
|
371 |
msgstr ""
|
372 |
|
373 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:56
|
374 |
-
#: templates/cc-forms/bootstrap.php:16
|
|
|
375 |
msgid "Exp"
|
376 |
msgstr ""
|
377 |
|
@@ -415,6 +404,22 @@ msgstr ""
|
|
415 |
msgid "There are no actions available at this time."
|
416 |
msgstr ""
|
417 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
#: includes/admin/meta-boxes/views/html-order-charge-data.php:2
|
419 |
msgid "Transaction Data / Actions"
|
420 |
msgstr ""
|
@@ -424,11 +429,11 @@ msgid "Pay for Order"
|
|
424 |
msgstr ""
|
425 |
|
426 |
#: includes/admin/meta-boxes/views/html-order-pay.php:3
|
427 |
-
msgid ""
|
428 |
-
"Admins can process customer orders over the phone using this functionality."
|
429 |
msgstr ""
|
430 |
|
431 |
#: includes/admin/meta-boxes/views/html-order-pay.php:21
|
|
|
432 |
#: includes/gateways/settings/applepay-settings.php:37
|
433 |
#: includes/gateways/settings/cc-settings.php:37
|
434 |
#: includes/gateways/settings/googlepay-settings.php:51
|
@@ -437,6 +442,7 @@ msgid "Charge Type"
|
|
437 |
msgstr ""
|
438 |
|
439 |
#: includes/admin/meta-boxes/views/html-order-pay.php:24
|
|
|
440 |
#: includes/gateways/settings/applepay-settings.php:42
|
441 |
#: includes/gateways/settings/cc-settings.php:42
|
442 |
#: includes/gateways/settings/googlepay-settings.php:56
|
@@ -444,16 +450,46 @@ msgstr ""
|
|
444 |
msgid "Authorize"
|
445 |
msgstr ""
|
446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:15
|
448 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:35
|
449 |
msgid "API Settings"
|
450 |
msgstr ""
|
451 |
|
|
|
|
|
|
|
|
|
|
|
452 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:45
|
453 |
-
msgid ""
|
454 |
-
"The mode determines if you are processing test transactions or live "
|
455 |
-
"transactions on your site. Test mode allows you to simulate payments so you "
|
456 |
-
"can test your integration."
|
457 |
msgstr ""
|
458 |
|
459 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:49
|
@@ -473,9 +509,7 @@ msgid "Click to Connect"
|
|
473 |
msgstr ""
|
474 |
|
475 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:59
|
476 |
-
msgid ""
|
477 |
-
"We make it easy to connect Stripe to your site. Click the Connect button to "
|
478 |
-
"go through our connect flow."
|
479 |
msgstr ""
|
480 |
|
481 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:63
|
@@ -484,9 +518,7 @@ msgid "Connection Test"
|
|
484 |
msgstr ""
|
485 |
|
486 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:66
|
487 |
-
msgid ""
|
488 |
-
"Click this button to perform a connection test. If successful, your site is "
|
489 |
-
"connected to Stripe."
|
490 |
msgstr ""
|
491 |
|
492 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:70
|
@@ -494,12 +526,7 @@ msgid "Webhook url"
|
|
494 |
msgstr ""
|
495 |
|
496 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:73
|
497 |
-
|
498 |
-
msgid ""
|
499 |
-
"<strong>Important:</strong> the webhook url is called by Stripe when events "
|
500 |
-
"occur in your account, like a source becomes chargeable. You must add this "
|
501 |
-
"webhook to your Stripe Dashboard if you are using any of the local gateways. "
|
502 |
-
"%sWebhook guide%s"
|
503 |
msgstr ""
|
504 |
|
505 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:77
|
@@ -508,11 +535,7 @@ msgstr ""
|
|
508 |
|
509 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:78
|
510 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:88
|
511 |
-
|
512 |
-
msgid ""
|
513 |
-
"The webhook secret is used to authenticate webhooks sent from Stripe. It "
|
514 |
-
"ensures no 3rd party can send you events, pretending to be Stripe. %sWebhook "
|
515 |
-
"guide%s"
|
516 |
msgstr ""
|
517 |
|
518 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:87
|
@@ -524,17 +547,11 @@ msgid "Debug Log"
|
|
524 |
msgstr ""
|
525 |
|
526 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:100
|
527 |
-
msgid ""
|
528 |
-
"When enabled, the plugin logs important errors and info that can help you "
|
529 |
-
"troubleshoot potential issues."
|
530 |
msgstr ""
|
531 |
|
532 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:105
|
533 |
-
|
534 |
-
msgid ""
|
535 |
-
"%s Your Stripe account has been connected. You can now accept Live and Test "
|
536 |
-
"payments. You can Re-Connect if you want to recycle your API keys for "
|
537 |
-
"security."
|
538 |
msgstr ""
|
539 |
|
540 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:121
|
@@ -546,14 +563,11 @@ msgid "Please try again."
|
|
546 |
msgstr ""
|
547 |
|
548 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:141
|
549 |
-
#, php-format
|
550 |
msgid "We were not able to connect your Stripe account. Reason: %s"
|
551 |
msgstr ""
|
552 |
|
553 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:161
|
554 |
-
msgid ""
|
555 |
-
"Your Stripe account has been connected to your WooCommerce store. You may "
|
556 |
-
"now accept payments in Live and Test mode."
|
557 |
msgstr ""
|
558 |
|
559 |
#: includes/admin/views/html-ach-fee.php:18
|
@@ -568,18 +582,6 @@ msgstr ""
|
|
568 |
msgid "Stripe Customer ID's"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: includes/admin/views/html-user-profile.php:8
|
572 |
-
msgid ""
|
573 |
-
"If you change a customer ID, the customer's payment methods will be imported "
|
574 |
-
"from your Stripe account."
|
575 |
-
msgstr ""
|
576 |
-
|
577 |
-
#: includes/admin/views/html-user-profile.php:9
|
578 |
-
msgid ""
|
579 |
-
"If you remove a customer ID, the customer's payment methods will be removed "
|
580 |
-
"from the WC payment methods table."
|
581 |
-
msgstr ""
|
582 |
-
|
583 |
#: includes/admin/views/html-user-profile.php:13
|
584 |
msgid "Live ID"
|
585 |
msgstr ""
|
@@ -602,11 +604,6 @@ msgstr ""
|
|
602 |
msgid "Token"
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: includes/admin/views/html-user-profile.php:47
|
606 |
-
#: includes/admin/views/html-user-profile.php:81
|
607 |
-
msgid "Action"
|
608 |
-
msgstr ""
|
609 |
-
|
610 |
#: includes/admin/views/html-user-profile.php:50
|
611 |
#: includes/admin/views/html-user-profile.php:84
|
612 |
msgid "No Action"
|
@@ -630,36 +627,27 @@ msgid "No test payment methods saved"
|
|
630 |
msgstr ""
|
631 |
|
632 |
#: includes/admin/views/html-user-profile.php:94
|
633 |
-
|
634 |
-
msgid ""
|
635 |
-
"%snote:%s payment methods will be deleted in Stripe if you use the delete "
|
636 |
-
"action."
|
637 |
msgstr ""
|
638 |
|
639 |
#: includes/class-wc-stripe-customer-manager.php:33
|
640 |
#: includes/class-wc-stripe-customer-manager.php:42
|
641 |
-
#, php-format
|
642 |
msgid "Error saving customer. Reason: %s"
|
643 |
msgstr ""
|
644 |
|
645 |
#: includes/class-wc-stripe-frontend-notices.php:37
|
646 |
-
msgid ""
|
647 |
-
"Your payment is being processed and your order status will be updated once "
|
648 |
-
"the funds are received."
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: includes/class-wc-stripe-frontend-scripts.php:
|
652 |
msgid "No matches found"
|
653 |
msgstr ""
|
654 |
|
655 |
#: includes/class-wc-stripe-gateway-ach.php:51
|
656 |
-
msgid ""
|
657 |
-
"Please update your ACH environment to Production to match your Stripe API "
|
658 |
-
"Mode."
|
659 |
msgstr ""
|
660 |
|
661 |
#: includes/class-wc-stripe-redirect-handler.php:39
|
662 |
-
#, php-format
|
663 |
msgid "Error retrieving payment source. Reason: %s"
|
664 |
msgstr ""
|
665 |
|
@@ -671,13 +659,11 @@ msgstr ""
|
|
671 |
msgid "Payment authorization failed."
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: includes/class-wc-stripe-rest-api.php:
|
675 |
-
#, php-format
|
676 |
msgid "%1$s is an invalid controller name."
|
677 |
msgstr ""
|
678 |
|
679 |
#: includes/class-wc-stripe-update.php:44
|
680 |
-
#, php-format
|
681 |
msgid "Thank you for updating Stripe for WooCommerce to version %1$s."
|
682 |
msgstr ""
|
683 |
|
@@ -685,26 +671,20 @@ msgstr ""
|
|
685 |
msgid "Quantity must be greater than zero."
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: includes/controllers/class-wc-stripe-controller-checkout.php:
|
689 |
-
|
690 |
-
msgid ""
|
691 |
-
"Some required fields were missing. Please click %shere%s to complete your "
|
692 |
-
"payment."
|
693 |
msgstr ""
|
694 |
|
695 |
-
#: includes/controllers/class-wc-stripe-controller-checkout.php:
|
696 |
msgid "Please review your order details then click Place Order."
|
697 |
msgstr ""
|
698 |
|
699 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:83
|
700 |
-
msgid ""
|
701 |
-
"You cannot register your domain until you have configured your Live API keys."
|
702 |
msgstr ""
|
703 |
|
704 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:99
|
705 |
-
msgid ""
|
706 |
-
"Domain registered successfully. You can confirm in your Stripe Dashboard at "
|
707 |
-
"https://dashboard.stripe.com/account/apple_pay."
|
708 |
msgstr ""
|
709 |
|
710 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:116
|
@@ -712,31 +692,23 @@ msgid "You must configure your secret key before creating webhooks."
|
|
712 |
msgstr ""
|
713 |
|
714 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:125
|
715 |
-
msgid ""
|
716 |
-
"There is already a webhook configured for this site. If you want to delete "
|
717 |
-
"the webhook, login to your Stripe Dashboard."
|
718 |
msgstr ""
|
719 |
|
720 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:147
|
721 |
-
|
722 |
-
msgid ""
|
723 |
-
"Webhook created in Stripe for %s environment. You can test your webhook by "
|
724 |
-
"logging in to the Stripe dashboard"
|
725 |
msgstr ""
|
726 |
|
727 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:167
|
728 |
-
#, php-format
|
729 |
msgid "Mode: %s. Invalid secret key. Please check your entry."
|
730 |
msgstr ""
|
731 |
|
732 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:180
|
733 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:183
|
734 |
-
#, php-format
|
735 |
msgid "Mode: %s. Invalid publishable key. Please check your entry."
|
736 |
msgstr ""
|
737 |
|
738 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:191
|
739 |
-
#, php-format
|
740 |
msgid "Connection test to Stripe was successful. Mode: %s."
|
741 |
msgstr ""
|
742 |
|
@@ -754,9 +726,7 @@ msgid "Order total must be greater than zero."
|
|
754 |
msgstr ""
|
755 |
|
756 |
#: includes/controllers/class-wc-stripe-controller-order-actions.php:187
|
757 |
-
|
758 |
-
msgid ""
|
759 |
-
"This order has already been processed. Transaction ID: %s. Payment method: %s"
|
760 |
msgstr ""
|
761 |
|
762 |
#: includes/controllers/class-wc-stripe-controller-order-actions.php:196
|
@@ -764,7 +734,6 @@ msgid "Order customer Id and payment method customer Id do not match."
|
|
764 |
msgstr ""
|
765 |
|
766 |
#: includes/controllers/class-wc-stripe-controller-payment-intent.php:56
|
767 |
-
#, php-format
|
768 |
msgid "Error creating payment intent. Reason: %s"
|
769 |
msgstr ""
|
770 |
|
@@ -813,18 +782,7 @@ msgstr ""
|
|
813 |
|
814 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach-v2.php:171
|
815 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:262
|
816 |
-
msgid ""
|
817 |
-
"You must set the API mode to live in order to enable the Plaid development "
|
818 |
-
"environment."
|
819 |
-
msgstr ""
|
820 |
-
|
821 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ach-v2.php:212
|
822 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ach-v2.php:215
|
823 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:303
|
824 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:306
|
825 |
-
#: includes/gateways/settings/ach-settings-v2.php:88
|
826 |
-
#: includes/gateways/settings/ach-settings.php:89
|
827 |
-
msgid "ACH Fee"
|
828 |
msgstr ""
|
829 |
|
830 |
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:25
|
@@ -935,38 +893,39 @@ msgid "Subscription"
|
|
935 |
msgstr ""
|
936 |
|
937 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:122
|
938 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:
|
939 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
940 |
-
#: includes/wc-stripe-functions.php:
|
|
|
941 |
msgid "Shipping"
|
942 |
msgstr ""
|
943 |
|
944 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:130
|
945 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:
|
946 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
947 |
-
#: includes/wc-stripe-functions.php:
|
|
|
948 |
msgid "Discount"
|
949 |
msgstr ""
|
950 |
|
951 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:141
|
952 |
-
#: includes/wc-stripe-functions.php:
|
953 |
msgid "Fees"
|
954 |
msgstr ""
|
955 |
|
956 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:
|
957 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-
|
958 |
-
#: includes/
|
959 |
-
#: includes/wc-stripe-functions.php:381 includes/wc-stripe-functions.php:431
|
960 |
msgid "Tax"
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:
|
964 |
-
#: includes/wc-stripe-functions.php:
|
965 |
msgid "Waiting..."
|
966 |
msgstr ""
|
967 |
|
968 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:
|
969 |
-
#: includes/wc-stripe-functions.php:
|
970 |
msgid "loading shipping methods..."
|
971 |
msgstr ""
|
972 |
|
@@ -990,19 +949,19 @@ msgstr ""
|
|
990 |
msgid "Klarna gateway that integrates with your Stripe account."
|
991 |
msgstr ""
|
992 |
|
993 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
994 |
msgid "Fee"
|
995 |
msgstr ""
|
996 |
|
997 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
998 |
msgid "Pay Now"
|
999 |
msgstr ""
|
1000 |
|
1001 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1002 |
msgid "Pay Later"
|
1003 |
msgstr ""
|
1004 |
|
1005 |
-
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:
|
1006 |
msgid "Pay Over Time"
|
1007 |
msgstr ""
|
1008 |
|
@@ -1037,9 +996,7 @@ msgid "Stripe Payment Request"
|
|
1037 |
msgstr ""
|
1038 |
|
1039 |
#: includes/gateways/class-wc-payment-gateway-stripe-payment-request.php:26
|
1040 |
-
msgid ""
|
1041 |
-
"Gateway that renders based on the user's browser. Chrome payment methods, "
|
1042 |
-
"Microsoft pay, etc."
|
1043 |
msgstr ""
|
1044 |
|
1045 |
#: includes/gateways/class-wc-payment-gateway-stripe-payment-request.php:69
|
@@ -1064,16 +1021,11 @@ msgid "Sepa gateway that integrates with your Stripe account."
|
|
1064 |
msgstr ""
|
1065 |
|
1066 |
#: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:32
|
1067 |
-
#, php-format
|
1068 |
msgid ""
|
1069 |
-
"By providing your IBAN and confirming this payment, you are\n"
|
1070 |
-
"\t\t\tauthorizing %s and Stripe, our payment service provider, to send "
|
1071 |
-
"
|
1072 |
-
"\t\t\
|
1073 |
-
"instructions. You are entitled to a refund from your bank under the\n"
|
1074 |
-
"\t\t\tterms and conditions of your agreement with your bank. A refund must "
|
1075 |
-
"be claimed within 8 weeks starting from the date on which your account was "
|
1076 |
-
"debited."
|
1077 |
msgstr ""
|
1078 |
|
1079 |
#: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:48
|
@@ -1112,9 +1064,7 @@ msgid "WeChat gateway that integrates with your Stripe account."
|
|
1112 |
msgstr ""
|
1113 |
|
1114 |
#: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:64
|
1115 |
-
msgid ""
|
1116 |
-
"Scan the QR code using your WeChat app. Once scanned click the Place Order "
|
1117 |
-
"button."
|
1118 |
msgstr ""
|
1119 |
|
1120 |
#: includes/gateways/settings/ach-settings-v2.php:4
|
@@ -1124,7 +1074,6 @@ msgstr ""
|
|
1124 |
|
1125 |
#: includes/gateways/settings/ach-settings-v2.php:4
|
1126 |
#: includes/gateways/settings/ach-settings.php:4
|
1127 |
-
#, php-format
|
1128 |
msgid "Read through our %sdocumentation%s to configure ACH payments"
|
1129 |
msgstr ""
|
1130 |
|
@@ -1154,13 +1103,7 @@ msgid "Production"
|
|
1154 |
msgstr ""
|
1155 |
|
1156 |
#: includes/gateways/settings/ach-settings-v2.php:19
|
1157 |
-
msgid ""
|
1158 |
-
"This setting determines the Plaid environment you are connecting with. When "
|
1159 |
-
"you are ready to accept live transactions, switch this option to Production."
|
1160 |
-
"<br><strong>Production</strong> - accept live ACH payments "
|
1161 |
-
"<br><strong>Development</strong> - use real bank login details with test "
|
1162 |
-
"transactions <br><strong>Sandbox</strong> - test integration using test "
|
1163 |
-
"credentials"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
#: includes/gateways/settings/ach-settings-v2.php:62
|
@@ -1168,11 +1111,6 @@ msgstr ""
|
|
1168 |
msgid "ACH Payment"
|
1169 |
msgstr ""
|
1170 |
|
1171 |
-
#: includes/gateways/settings/ach-settings-v2.php:64
|
1172 |
-
#: includes/gateways/settings/ach-settings.php:65
|
1173 |
-
msgid "Title of the ACH gateway"
|
1174 |
-
msgstr ""
|
1175 |
-
|
1176 |
#: includes/gateways/settings/ach-settings-v2.php:73
|
1177 |
#: includes/gateways/settings/ach-settings.php:74
|
1178 |
msgid "Client Name"
|
@@ -1188,15 +1126,9 @@ msgstr ""
|
|
1188 |
msgid "ACH Display"
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#: includes/gateways/settings/ach-settings-v2.php:
|
1192 |
-
#: includes/gateways/settings/ach-settings.php:
|
1193 |
-
|
1194 |
-
#: includes/gateways/settings/cc-settings.php:34
|
1195 |
-
#: includes/gateways/settings/googlepay-settings.php:48
|
1196 |
-
#: includes/gateways/settings/payment-request-settings.php:35
|
1197 |
-
msgid ""
|
1198 |
-
"This option allows you to customize how the credit card will display for "
|
1199 |
-
"your customers on orders, subscriptions, etc."
|
1200 |
msgstr ""
|
1201 |
|
1202 |
#: includes/gateways/settings/ach-settings-v2.php:95
|
@@ -1216,48 +1148,27 @@ msgstr ""
|
|
1216 |
|
1217 |
#: includes/gateways/settings/ach-settings-v2.php:99
|
1218 |
#: includes/gateways/settings/ach-settings.php:100
|
1219 |
-
msgid ""
|
1220 |
-
"You can assign a fee to the order for ACH payments. Amount is a static "
|
1221 |
-
"amount and percentage is a percentage of the cart amount."
|
1222 |
msgstr ""
|
1223 |
|
1224 |
#: includes/gateways/settings/ach-settings.php:20
|
1225 |
-
msgid ""
|
1226 |
-
"The active Plaid environment. You must set API mode to live to use Plaid's "
|
1227 |
-
"development environment."
|
1228 |
-
msgstr ""
|
1229 |
-
|
1230 |
-
#: includes/gateways/settings/ach-settings.php:23
|
1231 |
-
msgid "Plaid Keys"
|
1232 |
-
msgstr ""
|
1233 |
-
|
1234 |
-
#: includes/gateways/settings/ach-settings.php:26
|
1235 |
-
msgid "Client ID"
|
1236 |
msgstr ""
|
1237 |
|
1238 |
#: includes/gateways/settings/ach-settings.php:28
|
1239 |
msgid "ID that identifies your Plaid account."
|
1240 |
msgstr ""
|
1241 |
|
1242 |
-
#: includes/gateways/settings/ach-settings.php:32
|
1243 |
-
msgid "Public Key"
|
1244 |
-
msgstr ""
|
1245 |
-
|
1246 |
#: includes/gateways/settings/ach-settings.php:34
|
1247 |
msgid "Used to identify ACH payments initiated from your site."
|
1248 |
msgstr ""
|
1249 |
|
1250 |
-
#: includes/gateways/settings/ach-settings.php:38
|
1251 |
-
msgid "Plaid Secrets"
|
1252 |
-
msgstr ""
|
1253 |
-
|
1254 |
#: includes/gateways/settings/ach-settings.php:41
|
1255 |
msgid "Sandbox Secret"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
#: includes/gateways/settings/ach-settings.php:43
|
1259 |
-
msgid ""
|
1260 |
-
"Key that acts as a password when connecting to Plaid's sandbox environment."
|
1261 |
msgstr ""
|
1262 |
|
1263 |
#: includes/gateways/settings/ach-settings.php:47
|
@@ -1265,8 +1176,7 @@ msgid "Development Secret"
|
|
1265 |
msgstr ""
|
1266 |
|
1267 |
#: includes/gateways/settings/ach-settings.php:49
|
1268 |
-
msgid ""
|
1269 |
-
"Development allows you to test real bank credentials with test transactions."
|
1270 |
msgstr ""
|
1271 |
|
1272 |
#: includes/gateways/settings/ach-settings.php:53
|
@@ -1274,9 +1184,7 @@ msgid "Production Secret"
|
|
1274 |
msgstr ""
|
1275 |
|
1276 |
#: includes/gateways/settings/ach-settings.php:55
|
1277 |
-
msgid ""
|
1278 |
-
"Key that acts as a password when connecting to Plaid's production "
|
1279 |
-
"environment."
|
1280 |
msgstr ""
|
1281 |
|
1282 |
#: includes/gateways/settings/applepay-settings.php:4
|
@@ -1284,13 +1192,11 @@ msgid "Register Domain"
|
|
1284 |
msgstr ""
|
1285 |
|
1286 |
#: includes/gateways/settings/applepay-settings.php:4
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
"to
|
1292 |
-
"merchantid-domain-association%s</strong> file to your domain and register "
|
1293 |
-
"your domain within the Stripe Dashboard."
|
1294 |
msgstr ""
|
1295 |
|
1296 |
#: includes/gateways/settings/applepay-settings.php:10
|
@@ -1298,10 +1204,6 @@ msgstr ""
|
|
1298 |
msgid "If enabled, your site can accept Apple Pay payments through Stripe."
|
1299 |
msgstr ""
|
1300 |
|
1301 |
-
#: includes/gateways/settings/applepay-settings.php:19
|
1302 |
-
msgid "Title of the Apple Pay gateway"
|
1303 |
-
msgstr ""
|
1304 |
-
|
1305 |
#: includes/gateways/settings/applepay-settings.php:28
|
1306 |
#: includes/gateways/settings/cc-settings.php:28
|
1307 |
#: includes/gateways/settings/googlepay-settings.php:42
|
@@ -1312,9 +1214,7 @@ msgstr ""
|
|
1312 |
#: includes/gateways/settings/applepay-settings.php:44
|
1313 |
#: includes/gateways/settings/cc-settings.php:44
|
1314 |
#: includes/gateways/settings/payment-request-settings.php:45
|
1315 |
-
msgid ""
|
1316 |
-
"This option determines whether the customer's funds are captured immediately "
|
1317 |
-
"or authorized and can be captured at a later date."
|
1318 |
msgstr ""
|
1319 |
|
1320 |
#: includes/gateways/settings/applepay-settings.php:48
|
@@ -1341,13 +1241,6 @@ msgstr ""
|
|
1341 |
msgid "Top of Checkout"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
-
#: includes/gateways/settings/applepay-settings.php:56
|
1345 |
-
#: includes/gateways/settings/payment-request-settings.php:57
|
1346 |
-
msgid ""
|
1347 |
-
"Increase your conversion rate by offering Apple Pay on your Product and Cart "
|
1348 |
-
"pages, or at the top of the checkout page."
|
1349 |
-
msgstr ""
|
1350 |
-
|
1351 |
#: includes/gateways/settings/applepay-settings.php:59
|
1352 |
#: includes/gateways/settings/cc-settings.php:47
|
1353 |
#: includes/gateways/settings/googlepay-settings.php:73
|
@@ -1366,13 +1259,7 @@ msgstr ""
|
|
1366 |
#: includes/gateways/settings/cc-settings.php:54
|
1367 |
#: includes/gateways/settings/googlepay-settings.php:80
|
1368 |
#: includes/gateways/settings/payment-request-settings.php:67
|
1369 |
-
msgid ""
|
1370 |
-
"This is the status of the order once payment is complete. If <b>Default</b> "
|
1371 |
-
"is selected, then WooCommerce will set the order status automatically based "
|
1372 |
-
"on internal logic which states if a product is virtual and downloadable then "
|
1373 |
-
"status is set to complete. Products that require shipping are set to "
|
1374 |
-
"Processing. Default is the recommended setting as it allows standard "
|
1375 |
-
"WooCommerce code to process the order status."
|
1376 |
msgstr ""
|
1377 |
|
1378 |
#: includes/gateways/settings/applepay-settings.php:69
|
@@ -1430,28 +1317,15 @@ msgid "If enabled, your site can accept credit card payments through Stripe."
|
|
1430 |
msgstr ""
|
1431 |
|
1432 |
#: includes/gateways/settings/cc-settings.php:10
|
1433 |
-
#, php-format
|
1434 |
msgid "%sTest cards%s"
|
1435 |
msgstr ""
|
1436 |
|
1437 |
-
#: includes/gateways/settings/cc-settings.php:19
|
1438 |
-
#: includes/gateways/settings/googlepay-settings.php:33
|
1439 |
-
#: includes/gateways/settings/payment-request-settings.php:20
|
1440 |
-
msgid "Title of the credit card gateway"
|
1441 |
-
msgstr ""
|
1442 |
-
|
1443 |
#: includes/gateways/settings/cc-settings.php:58
|
1444 |
msgid "Allow Credit Card Save"
|
1445 |
msgstr ""
|
1446 |
|
1447 |
#: includes/gateways/settings/cc-settings.php:60
|
1448 |
-
msgid ""
|
1449 |
-
"If enabled, a checkbox will be available on the checkout page allowing your "
|
1450 |
-
"customer's to save their credit card. The payment methods are stored "
|
1451 |
-
"securely in Stripe's vault and never touch your server. Note: if the cart "
|
1452 |
-
"contains a subscription, there will be no checkbox because the payment "
|
1453 |
-
"method will be saved automatically. There will also be no checkbox for guest "
|
1454 |
-
"checkout as a user must be logged in to save a payment method."
|
1455 |
msgstr ""
|
1456 |
|
1457 |
#: includes/gateways/settings/cc-settings.php:63
|
@@ -1459,12 +1333,7 @@ msgid "Force 3D Secure"
|
|
1459 |
msgstr ""
|
1460 |
|
1461 |
#: includes/gateways/settings/cc-settings.php:66
|
1462 |
-
|
1463 |
-
msgid ""
|
1464 |
-
"Stripe internally determines when 3D secure should be presented based on "
|
1465 |
-
"their SCA engine. If <strong>Force 3D Secure</strong> is enabled, 3D Secure "
|
1466 |
-
"will be forced for ALL credit card transactions. In test mode 3D secure only "
|
1467 |
-
"shows for %s3DS Test Cards%s regardless of this setting."
|
1468 |
msgstr ""
|
1469 |
|
1470 |
#: includes/gateways/settings/cc-settings.php:69
|
@@ -1472,52 +1341,7 @@ msgid "Generic Errors"
|
|
1472 |
msgstr ""
|
1473 |
|
1474 |
#: includes/gateways/settings/cc-settings.php:72
|
1475 |
-
msgid ""
|
1476 |
-
"If enabled, credit card errors will be generic when presented to the "
|
1477 |
-
"customer. Merchants may prefer to not provide details on why a card was not "
|
1478 |
-
"accepted for security purposes."
|
1479 |
-
msgstr ""
|
1480 |
-
|
1481 |
-
#: includes/gateways/settings/cc-settings.php:75
|
1482 |
-
msgid "Accepted Payment Methods"
|
1483 |
-
msgstr ""
|
1484 |
-
|
1485 |
-
#: includes/gateways/settings/cc-settings.php:81
|
1486 |
-
msgid "Visa"
|
1487 |
-
msgstr ""
|
1488 |
-
|
1489 |
-
#: includes/gateways/settings/cc-settings.php:82
|
1490 |
-
#: includes/wc-stripe-functions.php:1039
|
1491 |
-
msgid "Amex"
|
1492 |
-
msgstr ""
|
1493 |
-
|
1494 |
-
#: includes/gateways/settings/cc-settings.php:83
|
1495 |
-
msgid "Discover"
|
1496 |
-
msgstr ""
|
1497 |
-
|
1498 |
-
#: includes/gateways/settings/cc-settings.php:84
|
1499 |
-
msgid "MasterCard"
|
1500 |
-
msgstr ""
|
1501 |
-
|
1502 |
-
#: includes/gateways/settings/cc-settings.php:85
|
1503 |
-
msgid "JCB"
|
1504 |
-
msgstr ""
|
1505 |
-
|
1506 |
-
#: includes/gateways/settings/cc-settings.php:86
|
1507 |
-
msgid "Maestro"
|
1508 |
-
msgstr ""
|
1509 |
-
|
1510 |
-
#: includes/gateways/settings/cc-settings.php:87
|
1511 |
-
msgid "Diners Club"
|
1512 |
-
msgstr ""
|
1513 |
-
|
1514 |
-
#: includes/gateways/settings/cc-settings.php:88
|
1515 |
-
msgid "Union Pay"
|
1516 |
-
msgstr ""
|
1517 |
-
|
1518 |
-
#: includes/gateways/settings/cc-settings.php:90
|
1519 |
-
msgid ""
|
1520 |
-
"The selected icons will show customers which credit card brands you accept."
|
1521 |
msgstr ""
|
1522 |
|
1523 |
#: includes/gateways/settings/cc-settings.php:93
|
@@ -1537,10 +1361,7 @@ msgid "Custom form"
|
|
1537 |
msgstr ""
|
1538 |
|
1539 |
#: includes/gateways/settings/cc-settings.php:102
|
1540 |
-
msgid ""
|
1541 |
-
"The Stripe form option displays a CC form rendered by Stripe. It works well "
|
1542 |
-
"with most themes. The custom card forms are offered if you want more options "
|
1543 |
-
"on the CC form design."
|
1544 |
msgstr ""
|
1545 |
|
1546 |
#: includes/gateways/settings/cc-settings.php:105
|
@@ -1556,10 +1377,7 @@ msgid "Postal Code"
|
|
1556 |
msgstr ""
|
1557 |
|
1558 |
#: includes/gateways/settings/cc-settings.php:120
|
1559 |
-
msgid ""
|
1560 |
-
"If enabled, the CC form will show the postal code on the checkout page. If "
|
1561 |
-
"disabled, the billing field's postal code will be used. The postal code will "
|
1562 |
-
"show on the Add Payment Method page for security reasons."
|
1563 |
msgstr ""
|
1564 |
|
1565 |
#: includes/gateways/settings/googlepay-settings.php:4
|
@@ -1567,18 +1385,11 @@ msgid "GPay Business Console"
|
|
1567 |
msgstr ""
|
1568 |
|
1569 |
#: includes/gateways/settings/googlepay-settings.php:4
|
1570 |
-
msgid ""
|
1571 |
-
"When test mode is enabled, Google Pay will work without a merchant ID, "
|
1572 |
-
"allowing you to capture the necessary screenshots the Google API team needs "
|
1573 |
-
"to approve your integration request."
|
1574 |
msgstr ""
|
1575 |
|
1576 |
#: includes/gateways/settings/googlepay-settings.php:7
|
1577 |
-
|
1578 |
-
msgid ""
|
1579 |
-
"If you don't want to request a Google Merchant ID, you can use the %sPayment "
|
1580 |
-
"Request Gateway%s which has a Google Pay integration through Stripe via the "
|
1581 |
-
"Chrome browser."
|
1582 |
msgstr ""
|
1583 |
|
1584 |
#: includes/gateways/settings/googlepay-settings.php:13
|
@@ -1590,9 +1401,7 @@ msgid "Dynamic Price"
|
|
1590 |
msgstr ""
|
1591 |
|
1592 |
#: includes/gateways/settings/googlepay-settings.php:22
|
1593 |
-
msgid ""
|
1594 |
-
"If enabled, the Google Payment sheet will show the order line items. You "
|
1595 |
-
"must have Google whitelist you for callback intents."
|
1596 |
msgstr ""
|
1597 |
|
1598 |
#: includes/gateways/settings/googlepay-settings.php:25
|
@@ -1600,22 +1409,11 @@ msgid "Merchant ID"
|
|
1600 |
msgstr ""
|
1601 |
|
1602 |
#: includes/gateways/settings/googlepay-settings.php:27
|
1603 |
-
msgid ""
|
1604 |
-
"Your Google Merchant ID is given to you by the Google API team once you "
|
1605 |
-
"register for Google Pay. While testing in TEST mode you can leave this value "
|
1606 |
-
"blank and Google Pay will work."
|
1607 |
msgstr ""
|
1608 |
|
1609 |
#: includes/gateways/settings/googlepay-settings.php:58
|
1610 |
-
msgid ""
|
1611 |
-
"This option determines whether the customer's funds are capture immediately "
|
1612 |
-
"or authorized and can be captured at a later date."
|
1613 |
-
msgstr ""
|
1614 |
-
|
1615 |
-
#: includes/gateways/settings/googlepay-settings.php:70
|
1616 |
-
msgid ""
|
1617 |
-
"Increase your conversion rate by offering Google Pay on your Product and "
|
1618 |
-
"Cart pages, or at the top of the checkout page."
|
1619 |
msgstr ""
|
1620 |
|
1621 |
#: includes/gateways/settings/googlepay-settings.php:83
|
@@ -1623,8 +1421,7 @@ msgid "Merchant Name"
|
|
1623 |
msgstr ""
|
1624 |
|
1625 |
#: includes/gateways/settings/googlepay-settings.php:85
|
1626 |
-
msgid ""
|
1627 |
-
"The name of your business as it appears on the Google Pay payment sheet."
|
1628 |
msgstr ""
|
1629 |
|
1630 |
#: includes/gateways/settings/googlepay-settings.php:89
|
@@ -1640,10 +1437,7 @@ msgid "Standard"
|
|
1640 |
msgstr ""
|
1641 |
|
1642 |
#: includes/gateways/settings/googlepay-settings.php:96
|
1643 |
-
msgid ""
|
1644 |
-
"This is the icon style that appears next to the gateway on the checkout "
|
1645 |
-
"page. Google's API team typically requires the With Outline option on the "
|
1646 |
-
"checkout page for branding purposes."
|
1647 |
msgstr ""
|
1648 |
|
1649 |
#: includes/gateways/settings/googlepay-settings.php:99
|
@@ -1683,17 +1477,13 @@ msgid "The button style of the GPay button."
|
|
1683 |
msgstr ""
|
1684 |
|
1685 |
#: includes/gateways/settings/googlepay-settings.php:124
|
1686 |
-
msgid ""
|
1687 |
-
"If you can't see the Google Pay button, try switching to a Chrome browser."
|
1688 |
msgstr ""
|
1689 |
|
1690 |
#: includes/gateways/settings/payment-request-settings.php:4
|
1691 |
msgid ""
|
1692 |
-
"The PaymentRequest gateway uses your customer's browser to render payment "
|
1693 |
-
"
|
1694 |
-
"gateway for example, or this gateway.\n"
|
1695 |
-
"\t\t\t\t\t\tThe difference is this gateway uses Stripe's PaymentRequest "
|
1696 |
-
"Button rather than render a Google Pay specific button."
|
1697 |
msgstr ""
|
1698 |
|
1699 |
#: includes/gateways/settings/payment-request-settings.php:18
|
@@ -1786,7 +1576,8 @@ msgstr ""
|
|
1786 |
msgid "Gateway Title"
|
1787 |
msgstr ""
|
1788 |
|
1789 |
-
#: includes/updates/update-3.1.0.php:31
|
|
|
1790 |
msgid "Stripe For WooCommerce Update"
|
1791 |
msgstr ""
|
1792 |
|
@@ -1795,304 +1586,217 @@ msgid "Greetings from Payment Plugins,"
|
|
1795 |
msgstr ""
|
1796 |
|
1797 |
#: includes/updates/update-3.1.0.php:34
|
1798 |
-
msgid ""
|
1799 |
-
"At Stripe's request, we have updated Stripe for WooCommerce to use the new "
|
1800 |
-
"Stripe Connect integration. This new integration offers even more security. "
|
1801 |
-
"Stripe is requesting that all merchants switch."
|
1802 |
msgstr ""
|
1803 |
|
1804 |
#: includes/updates/update-3.1.0.php:35
|
1805 |
-
|
1806 |
-
msgid ""
|
1807 |
-
"Click %shere%s to be redirected to your Stripe API settings page then click "
|
1808 |
-
"the <strong>Click to Connect</strong> button."
|
1809 |
msgstr ""
|
1810 |
|
1811 |
#: includes/updates/update-3.1.0.php:44
|
1812 |
msgid "Kind Regards,"
|
1813 |
msgstr ""
|
1814 |
|
1815 |
-
#: includes/
|
1816 |
-
msgid "Payment Plugins"
|
1817 |
-
msgstr ""
|
1818 |
-
|
1819 |
-
#: includes/wc-stripe-functions.php:264
|
1820 |
-
msgid "Please enter a valid postcode / ZIP."
|
1821 |
-
msgstr ""
|
1822 |
-
|
1823 |
-
#: includes/wc-stripe-functions.php:703
|
1824 |
msgid "Bootstrap form"
|
1825 |
msgstr ""
|
1826 |
|
1827 |
-
#: includes/wc-stripe-functions.php:
|
1828 |
msgid "Simple form"
|
1829 |
msgstr ""
|
1830 |
|
1831 |
-
#: includes/wc-stripe-functions.php:
|
1832 |
msgid "Minimalist form"
|
1833 |
msgstr ""
|
1834 |
|
1835 |
-
#: includes/wc-stripe-functions.php:
|
1836 |
msgid "Inline Form"
|
1837 |
msgstr ""
|
1838 |
|
1839 |
-
#: includes/wc-stripe-functions.php:
|
1840 |
msgid "Rounded Form"
|
1841 |
msgstr ""
|
1842 |
|
1843 |
-
#: includes/wc-stripe-functions.php:
|
1844 |
msgid "There was an error processing your credit card."
|
1845 |
msgstr ""
|
1846 |
|
1847 |
-
#: includes/wc-stripe-functions.php:
|
1848 |
-
msgid ""
|
1849 |
-
"The card number is incorrect. Check the card's number or use a different "
|
1850 |
-
"card."
|
1851 |
msgstr ""
|
1852 |
|
1853 |
-
#: includes/wc-stripe-functions.php:
|
1854 |
-
msgid ""
|
1855 |
-
"The card's security code is incorrect. Check the card's security code or use "
|
1856 |
-
"a different card."
|
1857 |
msgstr ""
|
1858 |
|
1859 |
-
#: includes/wc-stripe-functions.php:
|
1860 |
-
msgid ""
|
1861 |
-
"The card's ZIP code is incorrect. Check the card's ZIP code or use a "
|
1862 |
-
"different card."
|
1863 |
msgstr ""
|
1864 |
|
1865 |
-
#: includes/wc-stripe-functions.php:
|
1866 |
-
msgid ""
|
1867 |
-
"The card number is invalid. Check the card details or use a different card."
|
1868 |
msgstr ""
|
1869 |
|
1870 |
-
#: includes/wc-stripe-functions.php:
|
1871 |
-
|
1872 |
-
"
|
1873 |
-
"the field."
|
1874 |
msgstr ""
|
1875 |
|
1876 |
-
#: includes/wc-stripe-functions.php:
|
1877 |
-
msgid ""
|
1878 |
-
"The card's security code is invalid. Check the card's security code or use a "
|
1879 |
-
"different card."
|
1880 |
msgstr ""
|
1881 |
|
1882 |
-
#: includes/wc-stripe-functions.php:
|
1883 |
-
msgid ""
|
1884 |
-
"The card's expiration month is incorrect. Check the expiration date or use a "
|
1885 |
-
"different card."
|
1886 |
msgstr ""
|
1887 |
|
1888 |
-
#: includes/wc-stripe-functions.php:
|
1889 |
-
msgid ""
|
1890 |
-
"The card's expiration year is incorrect. Check the expiration date or use a "
|
1891 |
-
"different card."
|
1892 |
msgstr ""
|
1893 |
|
1894 |
-
#: includes/wc-stripe-functions.php:
|
1895 |
-
msgid ""
|
1896 |
-
"The card's address is incorrect. Check the card's address or use a different "
|
1897 |
-
"card."
|
1898 |
msgstr ""
|
1899 |
|
1900 |
-
#: includes/wc-stripe-functions.php:
|
1901 |
-
msgid ""
|
1902 |
-
"The card has expired. Check the expiration date or use a different card."
|
1903 |
msgstr ""
|
1904 |
|
1905 |
-
#: includes/wc-stripe-functions.php:
|
|
|
|
|
|
|
|
|
1906 |
msgid "The card has been declined."
|
1907 |
msgstr ""
|
1908 |
|
1909 |
-
#: includes/wc-stripe-functions.php:
|
1910 |
msgid "Your card's expiration year is in the past."
|
1911 |
msgstr ""
|
1912 |
|
1913 |
-
#: includes/wc-stripe-functions.php:
|
1914 |
-
msgid ""
|
1915 |
-
"The bank account number provided is invalid (e.g., missing digits). Bank "
|
1916 |
-
"account information varies from country to country. We recommend creating "
|
1917 |
-
"validations in your entry forms based on the bank account formats we provide."
|
1918 |
msgstr ""
|
1919 |
|
1920 |
-
#: includes/wc-stripe-functions.php:
|
1921 |
-
msgid ""
|
1922 |
-
"The specified amount is greater than the maximum amount allowed. Use a lower "
|
1923 |
-
"amount and try again."
|
1924 |
msgstr ""
|
1925 |
|
1926 |
-
#: includes/wc-stripe-functions.php:
|
1927 |
-
msgid ""
|
1928 |
-
"The specified amount is less than the minimum amount allowed. Use a higher "
|
1929 |
-
"amount and try again."
|
1930 |
msgstr ""
|
1931 |
|
1932 |
-
#: includes/wc-stripe-functions.php:
|
1933 |
-
msgid ""
|
1934 |
-
"The payment requires authentication to proceed. If your customer is off "
|
1935 |
-
"session, notify your customer to return to your application and complete the "
|
1936 |
-
"payment. If you provided the error_on_requires_action parameter, then your "
|
1937 |
-
"customer should try another card that does not require authentication."
|
1938 |
msgstr ""
|
1939 |
|
1940 |
-
#: includes/wc-stripe-functions.php:
|
1941 |
-
msgid ""
|
1942 |
-
"The transfer or payout could not be completed because the associated account "
|
1943 |
-
"does not have a sufficient balance available. Create a new transfer or "
|
1944 |
-
"payout using an amount less than or equal to the account's available balance."
|
1945 |
msgstr ""
|
1946 |
|
1947 |
-
#: includes/wc-stripe-functions.php:
|
1948 |
-
msgid ""
|
1949 |
-
"The bank account provided can not be used to charge, either because it is "
|
1950 |
-
"not verified yet or it is not supported."
|
1951 |
msgstr ""
|
1952 |
|
1953 |
-
#: includes/wc-stripe-functions.php:
|
1954 |
-
msgid ""
|
1955 |
-
"The bank account provided already exists on the specified Customer object. "
|
1956 |
-
"If the bank account should also be attached to a different customer, include "
|
1957 |
-
"the correct customer ID when making the request again."
|
1958 |
msgstr ""
|
1959 |
|
1960 |
-
#: includes/wc-stripe-functions.php:
|
1961 |
-
msgid ""
|
1962 |
-
"The bank account provided cannot be used for payouts. A different bank "
|
1963 |
-
"account must be used."
|
1964 |
msgstr ""
|
1965 |
|
1966 |
-
#: includes/wc-stripe-functions.php:
|
1967 |
-
msgid ""
|
1968 |
-
"Your Connect platform is attempting to share an unverified bank account with "
|
1969 |
-
"a connected account."
|
1970 |
msgstr ""
|
1971 |
|
1972 |
-
#: includes/wc-stripe-functions.php:
|
1973 |
-
msgid ""
|
1974 |
-
"The bank account cannot be verified, either because the microdeposit amounts "
|
1975 |
-
"provided do not match the actual amounts, or because verification has failed "
|
1976 |
-
"too many times."
|
1977 |
msgstr ""
|
1978 |
|
1979 |
-
#: includes/wc-stripe-functions.php:
|
1980 |
-
msgid ""
|
1981 |
-
"This card has been declined too many times. You can try to charge this card "
|
1982 |
-
"again after 24 hours. We suggest reaching out to your customer to make sure "
|
1983 |
-
"they have entered all of their information correctly and that there are no "
|
1984 |
-
"issues with their card."
|
1985 |
msgstr ""
|
1986 |
|
1987 |
-
#: includes/wc-stripe-functions.php:
|
1988 |
-
msgid ""
|
1989 |
-
"The charge you're attempting to capture has already been captured. Update "
|
1990 |
-
"the request with an uncaptured charge ID."
|
1991 |
msgstr ""
|
1992 |
|
1993 |
-
#: includes/wc-stripe-functions.php:
|
1994 |
-
msgid ""
|
1995 |
-
"The charge you're attempting to refund has already been refunded. Update the "
|
1996 |
-
"request to use the ID of a charge that has not been refunded."
|
1997 |
msgstr ""
|
1998 |
|
1999 |
-
#: includes/wc-stripe-functions.php:
|
2000 |
-
msgid ""
|
2001 |
-
"The charge you're attempting to refund has been charged back. Check the "
|
2002 |
-
"disputes documentation to learn how to respond to the dispute."
|
2003 |
msgstr ""
|
2004 |
|
2005 |
-
#: includes/wc-stripe-functions.php:
|
2006 |
-
msgid ""
|
2007 |
-
"This charge would cause you to exceed your rolling-window processing limit "
|
2008 |
-
"for this source type. Please retry the charge later, or contact us to "
|
2009 |
-
"request a higher processing limit."
|
2010 |
msgstr ""
|
2011 |
|
2012 |
-
#: includes/wc-stripe-functions.php:
|
2013 |
-
msgid ""
|
2014 |
-
"The charge cannot be captured as the authorization has expired. Auth and "
|
2015 |
-
"capture charges must be captured within seven days."
|
2016 |
msgstr ""
|
2017 |
|
2018 |
-
#: includes/wc-stripe-functions.php:
|
2019 |
-
msgid ""
|
2020 |
-
"One or more provided parameters was not allowed for the given operation on "
|
2021 |
-
"the Charge. Check our API reference or the returned error message to see "
|
2022 |
-
"which values were not correct for that Charge."
|
2023 |
msgstr ""
|
2024 |
|
2025 |
-
#: includes/wc-stripe-functions.php:
|
2026 |
-
msgid ""
|
2027 |
-
"The email address is invalid (e.g., not properly formatted). Check that the "
|
2028 |
-
"email address is properly formatted and only includes allowed characters."
|
2029 |
msgstr ""
|
2030 |
|
2031 |
-
#: includes/wc-stripe-functions.php:
|
2032 |
-
msgid ""
|
2033 |
-
"The idempotency key provided is currently being used in another request. "
|
2034 |
-
"This occurs if your integration is making duplicate requests simultaneously."
|
2035 |
msgstr ""
|
2036 |
|
2037 |
-
#: includes/wc-stripe-functions.php:
|
2038 |
-
msgid ""
|
2039 |
-
"The specified amount is invalid. The charge amount must be a positive "
|
2040 |
-
"integer in the smallest currency unit, and not exceed the minimum or maximum "
|
2041 |
-
"amount."
|
2042 |
msgstr ""
|
2043 |
|
2044 |
-
#: includes/wc-stripe-functions.php:
|
2045 |
-
msgid ""
|
2046 |
-
"The source cannot be used because it is not in the correct state (e.g., a "
|
2047 |
-
"charge request is trying to use a source with a pending, failed, or consumed "
|
2048 |
-
"source). Check the status of the source you are attempting to use."
|
2049 |
msgstr ""
|
2050 |
|
2051 |
-
#: includes/wc-stripe-functions.php:
|
2052 |
-
msgid ""
|
2053 |
-
"Both a customer and source ID have been provided, but the source has not "
|
2054 |
-
"been saved to the customer. To create a charge for a customer with a "
|
2055 |
-
"specified source, you must first save the card details."
|
2056 |
msgstr ""
|
2057 |
|
2058 |
-
#: includes/wc-stripe-functions.php:
|
2059 |
msgid "The ZIP code provided was incorrect."
|
2060 |
msgstr ""
|
2061 |
|
2062 |
-
#: includes/wc-stripe-functions.php:
|
2063 |
-
msgid ""
|
2064 |
-
"An error occurred while processing the card. Try again later or with a "
|
2065 |
-
"different payment method."
|
2066 |
msgstr ""
|
2067 |
|
2068 |
-
#: includes/wc-stripe-functions.php:
|
2069 |
msgid "The card does not support this type of purchase."
|
2070 |
msgstr ""
|
2071 |
|
2072 |
-
#: includes/wc-stripe-functions.php:
|
2073 |
-
#: includes/wc-stripe-functions.php:
|
|
|
2074 |
msgid "The card has been declined for an unknown reason."
|
2075 |
msgstr ""
|
2076 |
|
2077 |
-
#: includes/wc-stripe-functions.php:
|
2078 |
-
msgid ""
|
2079 |
-
"The customer has exceeded the balance or credit limit available on their "
|
2080 |
-
"card."
|
2081 |
msgstr ""
|
2082 |
|
2083 |
-
#: includes/wc-stripe-functions.php:
|
2084 |
msgid "The card does not support the specified currency."
|
2085 |
msgstr ""
|
2086 |
|
2087 |
-
#: includes/wc-stripe-functions.php:
|
2088 |
msgid "The payment has been declined as Stripe suspects it is fraudulent."
|
2089 |
msgstr ""
|
2090 |
|
2091 |
-
#: includes/wc-stripe-functions.php:
|
2092 |
msgid "The PIN entered is incorrect. "
|
2093 |
msgstr ""
|
2094 |
|
2095 |
-
#: includes/wc-stripe-functions.php:
|
2096 |
msgid "The card has insufficient funds to complete the purchase."
|
2097 |
msgstr ""
|
2098 |
|
@@ -2105,25 +1809,30 @@ msgid "payment_intent.succeeded webhook recieved. Payment has been completed."
|
|
2105 |
msgstr ""
|
2106 |
|
2107 |
#: stripe-payments.php:17
|
2108 |
-
#, php-format
|
2109 |
msgid "Your PHP version is %s but Stripe requires version 5.4+."
|
2110 |
msgstr ""
|
2111 |
|
2112 |
-
#: templates/cart/payment-methods.php:13
|
|
|
2113 |
msgid "or"
|
2114 |
msgstr ""
|
2115 |
|
2116 |
-
#: templates/cc-forms/bootstrap.php:10
|
2117 |
-
#: templates/cc-forms/
|
|
|
|
|
2118 |
msgid "Card Number"
|
2119 |
msgstr ""
|
2120 |
|
2121 |
-
#: templates/cc-forms/bootstrap.php:20
|
2122 |
-
#: templates/cc-forms/
|
|
|
|
|
2123 |
msgid "CVV"
|
2124 |
msgstr ""
|
2125 |
|
2126 |
-
#: templates/cc-forms/bootstrap.php:25
|
|
|
2127 |
#: templates/cc-forms/simple.php:34
|
2128 |
msgid "ZIP"
|
2129 |
msgstr ""
|
1 |
+
# Copyright (C) 2020 Payment Plugins, support@paymentplugins.com
|
2 |
+
# This file is distributed under the same license as the Stripe For WooCommerce plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Stripe For WooCommerce 3.1.2\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-stripe-payment\n"
|
7 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2020-05-05T17:45:47+00:00\n"
|
13 |
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
+
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
+
"X-Domain: woo-stripe-payment\n"
|
16 |
+
|
17 |
+
#. Plugin Name of the plugin
|
18 |
+
msgid "Stripe For WooCommerce"
|
19 |
+
msgstr ""
|
20 |
+
|
21 |
+
#. Plugin URI of the plugin
|
22 |
+
msgid "https://docs.paymentplugins.com/wc-stripe/config/"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#. Description of the plugin
|
26 |
+
msgid "Accept credit cards, Google Pay, & Apple Pay, ACH, Klarna and more using Stripe."
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#. Author of the plugin
|
30 |
+
msgid "Payment Plugins, support@paymentplugins.com"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:109
|
34 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:12
|
35 |
#: includes/gateways/settings/ach-settings-v2.php:7
|
36 |
#: includes/gateways/settings/ach-settings.php:7
|
37 |
#: includes/gateways/settings/applepay-settings.php:7
|
41 |
msgid "Enabled"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:113
|
|
|
45 |
msgid "If enabled, your site can accept %s payments through Stripe."
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:117
|
49 |
#: includes/gateways/settings/ach-settings-v2.php:58
|
50 |
#: includes/gateways/settings/ach-settings.php:59
|
51 |
#: includes/gateways/settings/applepay-settings.php:13
|
55 |
msgid "General Settings"
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:120
|
59 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:47
|
60 |
#: includes/gateways/settings/ach-settings-v2.php:61
|
61 |
#: includes/gateways/settings/ach-settings.php:62
|
66 |
msgid "Title"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:126
|
|
|
|
|
|
|
|
|
|
|
70 |
#: includes/gateways/settings/ach-settings-v2.php:67
|
71 |
#: includes/gateways/settings/ach-settings.php:68
|
72 |
#: includes/gateways/settings/applepay-settings.php:22
|
76 |
msgid "Description"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:128
|
80 |
#: includes/gateways/settings/ach-settings-v2.php:69
|
81 |
#: includes/gateways/settings/ach-settings.php:70
|
82 |
#: includes/gateways/settings/applepay-settings.php:24
|
86 |
msgid "Leave blank if you don't want a description to show for the gateway."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:176
|
|
|
90 |
msgid "Order %s"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:239
|
|
|
94 |
msgid "Gateway will appear when store currency is <strong>%s</strong>"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php:242
|
|
|
98 |
msgid " & billing country is <strong>%s</strong>"
|
99 |
msgstr ""
|
100 |
|
101 |
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:337
|
102 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:114
|
|
|
103 |
msgid "Error processing payment. Reason: %s"
|
104 |
msgstr ""
|
105 |
|
106 |
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:344
|
107 |
+
msgid "Charge %s is pending. Payment Method: %s. Payment will be completed once charge.succeeded webhook received from Stripe."
|
|
|
|
|
|
|
108 |
msgstr ""
|
109 |
|
110 |
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:352
|
|
|
111 |
msgid "Order %s successful in Stripe. Charge: %s. Payment Method: %s"
|
112 |
msgstr ""
|
113 |
|
119 |
msgid "authorization"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:395
|
|
|
|
|
|
|
|
|
|
|
123 |
#: includes/controllers/class-wc-stripe-controller-cart.php:135
|
124 |
#: includes/controllers/class-wc-stripe-controller-cart.php:184
|
125 |
#: includes/controllers/class-wc-stripe-controller-googlepay.php:129
|
127 |
msgid "Total"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:453
|
131 |
msgid "User must be logged in."
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:465
|
|
|
135 |
msgid "Error saving your payment method. Reason: %s"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:479
|
|
|
139 |
msgid "Error saving payment method. Reason: %s"
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:496
|
|
|
143 |
msgid "Order refunded in Stripe. Amount: %s"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:525
|
|
|
147 |
msgid "Order amount captured in Stripe. Amount: %s"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:529
|
|
|
151 |
msgid "Error capturing charge in Stripe. Reason: %s"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:549
|
|
|
155 |
msgid "Error voiding charge. Reason: %s"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:551
|
159 |
msgid "Charge voided in Stripe."
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:711
|
163 |
msgid "n/a"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:734
|
167 |
#: includes/admin/meta-boxes/views/html-order-pay.php:42
|
168 |
msgid "New Card"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:738
|
172 |
#: includes/admin/meta-boxes/views/html-order-pay.php:30
|
173 |
msgid "Saved Cards"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:895
|
|
|
177 |
msgid "Attemp to save payment method failed. Reason: %s"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:915
|
181 |
+
msgid "We were not able to save your payment method. To prevent billing issues with your subscription, please add a payment method to the subscription."
|
|
|
|
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:917
|
|
|
185 |
msgid "We were not able to save your payment method. Reason: %s"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:949
|
189 |
msgid "Payment Method Token"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:968
|
|
|
193 |
msgid "Recurring payment for order failed. Reason: %s"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:977
|
|
|
197 |
msgid "Recurring payment captured in Stripe. Payment method: %s"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:979
|
|
|
201 |
msgid "Recurring payment authorized in Stripe. Payment method: %s"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:982
|
205 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1228
|
|
|
206 |
msgid "Customer must manually complete payment for payment method %s"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:998
|
|
|
210 |
msgid "Error saving payment method for subscription. Reason: %s"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1054
|
214 |
#: includes/abstract/abstract-wc-stripe-payment.php:175
|
|
|
215 |
msgid "Order %s from %s"
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1215
|
|
|
219 |
msgid "Pre-order payment for order failed. Reason: %s"
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1223
|
|
|
223 |
msgid "Pre-order payment captured in Stripe. Payment method: %s"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1225
|
|
|
227 |
msgid "Pre-order payment authorized in Stripe. Payment method: %s"
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1299
|
231 |
msgid "Cannot process payment"
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: includes/abstract/abstract-wc-payment-gateway-stripe.php:1307
|
235 |
+
msgid "Increase your conversion rate by offering %1$s on your Product and Cart pages, or at the top of the checkout page. <br/><strong>Note:</strong> you can control which products display %s by going to the product edit page."
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
#: includes/abstract/abstract-wc-payment-token-stripe.php:167
|
239 |
#: includes/abstract/abstract-wc-payment-token-stripe.php:173
|
|
|
240 |
msgid "Error deleting Stripe card. Token Id: %s"
|
241 |
msgstr ""
|
242 |
|
253 |
msgstr ""
|
254 |
|
255 |
#: includes/admin/class-wc-stripe-admin-menus.php:29
|
256 |
+
#: includes/class-wc-stripe-install.php:30
|
257 |
msgid "Settings"
|
258 |
msgstr ""
|
259 |
|
268 |
msgstr ""
|
269 |
|
270 |
#: includes/admin/class-wc-stripe-admin-notices.php:51
|
|
|
271 |
msgid ""
|
272 |
+
"At Stripe's request we have updated how the Stripe for WooCommerce\r\n"
|
273 |
+
"\t\t\t\t\t\t\t\t\tplugin integrates with Stripe. This new integration offers even more security and \r\n"
|
274 |
+
"\t\t\t\t\t\t\t\t\tStripe is requesting that all merchants switch. %sUpdate Integration%s"
|
|
|
|
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: includes/admin/class-wc-stripe-admin-settings.php:79
|
278 |
msgid "Local Gateways"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: includes/admin/class-wc-stripe-admin-settings.php:90
|
282 |
+
msgid "Stripe Email Options"
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: includes/admin/class-wc-stripe-admin-settings.php:93
|
286 |
+
msgid "Email Receipt"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: includes/admin/class-wc-stripe-admin-settings.php:96
|
290 |
+
msgid "If enabled, an email receipt will be sent to the customer by Stripe when the order is processed."
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: includes/admin/meta-boxes/class-wc-stripe-admin-meta-box-product-data.php:25
|
294 |
+
msgid "Stripe Settings"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:9
|
298 |
#: includes/admin/views/html-user-profile.php:34
|
299 |
#: includes/admin/views/html-user-profile.php:68
|
305 |
msgstr ""
|
306 |
|
307 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:14
|
308 |
+
#: includes/admin/meta-boxes/views/html-order-actions.php:42
|
309 |
#: includes/admin/meta-boxes/views/html-order-pay.php:23
|
310 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:35
|
311 |
#: includes/gateways/settings/applepay-settings.php:41
|
312 |
#: includes/gateways/settings/cc-settings.php:41
|
313 |
#: includes/gateways/settings/googlepay-settings.php:55
|
334 |
msgid "Live"
|
335 |
msgstr ""
|
336 |
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:28
|
338 |
msgid "Status"
|
339 |
msgstr ""
|
359 |
msgstr ""
|
360 |
|
361 |
#: includes/admin/meta-boxes/views/html-charge-data-subview.php:56
|
362 |
+
#: templates/cc-forms/bootstrap.php:16
|
363 |
+
#: templates/cc-forms/minimalist.php:26
|
364 |
msgid "Exp"
|
365 |
msgstr ""
|
366 |
|
404 |
msgid "There are no actions available at this time."
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: includes/admin/meta-boxes/views/html-order-actions.php:21
|
408 |
+
msgid "Capture Charge"
|
409 |
+
msgstr ""
|
410 |
+
|
411 |
+
#: includes/admin/meta-boxes/views/html-order-actions.php:29
|
412 |
+
msgid "Total available to capture"
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: includes/admin/meta-boxes/views/html-order-actions.php:33
|
416 |
+
msgid "Amount To Capture"
|
417 |
+
msgstr ""
|
418 |
+
|
419 |
+
#: includes/admin/meta-boxes/views/html-order-actions.php:43
|
420 |
+
msgid "Cancel"
|
421 |
+
msgstr ""
|
422 |
+
|
423 |
#: includes/admin/meta-boxes/views/html-order-charge-data.php:2
|
424 |
msgid "Transaction Data / Actions"
|
425 |
msgstr ""
|
429 |
msgstr ""
|
430 |
|
431 |
#: includes/admin/meta-boxes/views/html-order-pay.php:3
|
432 |
+
msgid "Admins can process customer orders over the phone using this functionality."
|
|
|
433 |
msgstr ""
|
434 |
|
435 |
#: includes/admin/meta-boxes/views/html-order-pay.php:21
|
436 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:13
|
437 |
#: includes/gateways/settings/applepay-settings.php:37
|
438 |
#: includes/gateways/settings/cc-settings.php:37
|
439 |
#: includes/gateways/settings/googlepay-settings.php:51
|
442 |
msgstr ""
|
443 |
|
444 |
#: includes/admin/meta-boxes/views/html-order-pay.php:24
|
445 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:36
|
446 |
#: includes/gateways/settings/applepay-settings.php:42
|
447 |
#: includes/gateways/settings/cc-settings.php:42
|
448 |
#: includes/gateways/settings/googlepay-settings.php:56
|
450 |
msgid "Authorize"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: includes/admin/meta-boxes/views/html-order-pay.php:52
|
454 |
+
msgid "Pay"
|
455 |
+
msgstr ""
|
456 |
+
|
457 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:4
|
458 |
+
msgid "In this section you can control which gateways are displayed on the product page."
|
459 |
+
msgstr ""
|
460 |
+
|
461 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:11
|
462 |
+
msgid "Method"
|
463 |
+
msgstr ""
|
464 |
+
|
465 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:47
|
466 |
+
msgid "Button Position"
|
467 |
+
msgstr ""
|
468 |
+
|
469 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:49
|
470 |
+
msgid "Below add to cart"
|
471 |
+
msgstr ""
|
472 |
+
|
473 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:50
|
474 |
+
msgid "Above add to cart"
|
475 |
+
msgstr ""
|
476 |
+
|
477 |
+
#: includes/admin/meta-boxes/views/html-product-data.php:58
|
478 |
+
msgid "Save"
|
479 |
+
msgstr ""
|
480 |
+
|
481 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:15
|
482 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:35
|
483 |
msgid "API Settings"
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: includes/admin/settings/class-wc-stripe-api-settings.php:41
|
487 |
+
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:147
|
488 |
+
msgid "Test"
|
489 |
+
msgstr ""
|
490 |
+
|
491 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:45
|
492 |
+
msgid "The mode determines if you are processing test transactions or live transactions on your site. Test mode allows you to simulate payments so you can test your integration."
|
|
|
|
|
|
|
493 |
msgstr ""
|
494 |
|
495 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:49
|
509 |
msgstr ""
|
510 |
|
511 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:59
|
512 |
+
msgid "We make it easy to connect Stripe to your site. Click the Connect button to go through our connect flow."
|
|
|
|
|
513 |
msgstr ""
|
514 |
|
515 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:63
|
518 |
msgstr ""
|
519 |
|
520 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:66
|
521 |
+
msgid "Click this button to perform a connection test. If successful, your site is connected to Stripe."
|
|
|
|
|
522 |
msgstr ""
|
523 |
|
524 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:70
|
526 |
msgstr ""
|
527 |
|
528 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:73
|
529 |
+
msgid "<strong>Important:</strong> the webhook url is called by Stripe when events occur in your account, like a source becomes chargeable. You must add this webhook to your Stripe Dashboard if you are using any of the local gateways. %sWebhook guide%s"
|
|
|
|
|
|
|
|
|
|
|
530 |
msgstr ""
|
531 |
|
532 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:77
|
535 |
|
536 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:78
|
537 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:88
|
538 |
+
msgid "The webhook secret is used to authenticate webhooks sent from Stripe. It ensures no 3rd party can send you events, pretending to be Stripe. %sWebhook guide%s"
|
|
|
|
|
|
|
|
|
539 |
msgstr ""
|
540 |
|
541 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:87
|
547 |
msgstr ""
|
548 |
|
549 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:100
|
550 |
+
msgid "When enabled, the plugin logs important errors and info that can help you troubleshoot potential issues."
|
|
|
|
|
551 |
msgstr ""
|
552 |
|
553 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:105
|
554 |
+
msgid "%s Your Stripe account has been connected. You can now accept Live and Test payments. You can Re-Connect if you want to recycle your API keys for security."
|
|
|
|
|
|
|
|
|
555 |
msgstr ""
|
556 |
|
557 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:121
|
563 |
msgstr ""
|
564 |
|
565 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:141
|
|
|
566 |
msgid "We were not able to connect your Stripe account. Reason: %s"
|
567 |
msgstr ""
|
568 |
|
569 |
#: includes/admin/settings/class-wc-stripe-api-settings.php:161
|
570 |
+
msgid "Your Stripe account has been connected to your WooCommerce store. You may now accept payments in Live and Test mode."
|
|
|
|
|
571 |
msgstr ""
|
572 |
|
573 |
#: includes/admin/views/html-ach-fee.php:18
|
582 |
msgid "Stripe Customer ID's"
|
583 |
msgstr ""
|
584 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
585 |
#: includes/admin/views/html-user-profile.php:13
|
586 |
msgid "Live ID"
|
587 |
msgstr ""
|
604 |
msgid "Token"
|
605 |
msgstr ""
|
606 |
|
|
|
|
|
|
|
|
|
|
|
607 |
#: includes/admin/views/html-user-profile.php:50
|
608 |
#: includes/admin/views/html-user-profile.php:84
|
609 |
msgid "No Action"
|
627 |
msgstr ""
|
628 |
|
629 |
#: includes/admin/views/html-user-profile.php:94
|
630 |
+
msgid "%snote:%s payment methods will be deleted in Stripe if you use the delete action."
|
|
|
|
|
|
|
631 |
msgstr ""
|
632 |
|
633 |
#: includes/class-wc-stripe-customer-manager.php:33
|
634 |
#: includes/class-wc-stripe-customer-manager.php:42
|
|
|
635 |
msgid "Error saving customer. Reason: %s"
|
636 |
msgstr ""
|
637 |
|
638 |
#: includes/class-wc-stripe-frontend-notices.php:37
|
639 |
+
msgid "Your payment is being processed and your order status will be updated once the funds are received."
|
|
|
|
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: includes/class-wc-stripe-frontend-scripts.php:63
|
643 |
msgid "No matches found"
|
644 |
msgstr ""
|
645 |
|
646 |
#: includes/class-wc-stripe-gateway-ach.php:51
|
647 |
+
msgid "Please update your ACH environment to Production to match your Stripe API Mode."
|
|
|
|
|
648 |
msgstr ""
|
649 |
|
650 |
#: includes/class-wc-stripe-redirect-handler.php:39
|
|
|
651 |
msgid "Error retrieving payment source. Reason: %s"
|
652 |
msgstr ""
|
653 |
|
659 |
msgid "Payment authorization failed."
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: includes/class-wc-stripe-rest-api.php:45
|
|
|
663 |
msgid "%1$s is an invalid controller name."
|
664 |
msgstr ""
|
665 |
|
666 |
#: includes/class-wc-stripe-update.php:44
|
|
|
667 |
msgid "Thank you for updating Stripe for WooCommerce to version %1$s."
|
668 |
msgstr ""
|
669 |
|
671 |
msgid "Quantity must be greater than zero."
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: includes/controllers/class-wc-stripe-controller-checkout.php:177
|
675 |
+
msgid "Some required fields were missing. Please click %shere%s to complete your payment."
|
|
|
|
|
|
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: includes/controllers/class-wc-stripe-controller-checkout.php:210
|
679 |
msgid "Please review your order details then click Place Order."
|
680 |
msgstr ""
|
681 |
|
682 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:83
|
683 |
+
msgid "You cannot register your domain until you have configured your Live API keys."
|
|
|
684 |
msgstr ""
|
685 |
|
686 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:99
|
687 |
+
msgid "Domain registered successfully. You can confirm in your Stripe Dashboard at https://dashboard.stripe.com/account/apple_pay."
|
|
|
|
|
688 |
msgstr ""
|
689 |
|
690 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:116
|
692 |
msgstr ""
|
693 |
|
694 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:125
|
695 |
+
msgid "There is already a webhook configured for this site. If you want to delete the webhook, login to your Stripe Dashboard."
|
|
|
|
|
696 |
msgstr ""
|
697 |
|
698 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:147
|
699 |
+
msgid "Webhook created in Stripe for %s environment. You can test your webhook by logging in to the Stripe dashboard"
|
|
|
|
|
|
|
700 |
msgstr ""
|
701 |
|
702 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:167
|
|
|
703 |
msgid "Mode: %s. Invalid secret key. Please check your entry."
|
704 |
msgstr ""
|
705 |
|
706 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:180
|
707 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:183
|
|
|
708 |
msgid "Mode: %s. Invalid publishable key. Please check your entry."
|
709 |
msgstr ""
|
710 |
|
711 |
#: includes/controllers/class-wc-stripe-controller-gateway-settings.php:191
|
|
|
712 |
msgid "Connection test to Stripe was successful. Mode: %s."
|
713 |
msgstr ""
|
714 |
|
726 |
msgstr ""
|
727 |
|
728 |
#: includes/controllers/class-wc-stripe-controller-order-actions.php:187
|
729 |
+
msgid "This order has already been processed. Transaction ID: %s. Payment method: %s"
|
|
|
|
|
730 |
msgstr ""
|
731 |
|
732 |
#: includes/controllers/class-wc-stripe-controller-order-actions.php:196
|
734 |
msgstr ""
|
735 |
|
736 |
#: includes/controllers/class-wc-stripe-controller-payment-intent.php:56
|
|
|
737 |
msgid "Error creating payment intent. Reason: %s"
|
738 |
msgstr ""
|
739 |
|
782 |
|
783 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach-v2.php:171
|
784 |
#: includes/gateways/class-wc-payment-gateway-stripe-ach.php:262
|
785 |
+
msgid "You must set the API mode to live in order to enable the Plaid development environment."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
msgstr ""
|
787 |
|
788 |
#: includes/gateways/class-wc-payment-gateway-stripe-alipay.php:25
|
893 |
msgstr ""
|
894 |
|
895 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:122
|
896 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:174
|
897 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:169
|
898 |
+
#: includes/wc-stripe-functions.php:363
|
899 |
+
#: includes/wc-stripe-functions.php:411
|
900 |
msgid "Shipping"
|
901 |
msgstr ""
|
902 |
|
903 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:130
|
904 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:195
|
905 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:179
|
906 |
+
#: includes/wc-stripe-functions.php:379
|
907 |
+
#: includes/wc-stripe-functions.php:419
|
908 |
msgid "Discount"
|
909 |
msgstr ""
|
910 |
|
911 |
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:141
|
912 |
+
#: includes/wc-stripe-functions.php:430
|
913 |
msgid "Fees"
|
914 |
msgstr ""
|
915 |
|
916 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:203
|
917 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:200
|
918 |
+
#: includes/wc-stripe-functions.php:387
|
|
|
919 |
msgid "Tax"
|
920 |
msgstr ""
|
921 |
|
922 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:234
|
923 |
+
#: includes/wc-stripe-functions.php:501
|
924 |
msgid "Waiting..."
|
925 |
msgstr ""
|
926 |
|
927 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:235
|
928 |
+
#: includes/wc-stripe-functions.php:502
|
929 |
msgid "loading shipping methods..."
|
930 |
msgstr ""
|
931 |
|
949 |
msgid "Klarna gateway that integrates with your Stripe account."
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:192
|
953 |
msgid "Fee"
|
954 |
msgstr ""
|
955 |
|
956 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:228
|
957 |
msgid "Pay Now"
|
958 |
msgstr ""
|
959 |
|
960 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:229
|
961 |
msgid "Pay Later"
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: includes/gateways/class-wc-payment-gateway-stripe-klarna.php:230
|
965 |
msgid "Pay Over Time"
|
966 |
msgstr ""
|
967 |
|
996 |
msgstr ""
|
997 |
|
998 |
#: includes/gateways/class-wc-payment-gateway-stripe-payment-request.php:26
|
999 |
+
msgid "Gateway that renders based on the user's browser. Chrome payment methods, Microsoft pay, etc."
|
|
|
|
|
1000 |
msgstr ""
|
1001 |
|
1002 |
#: includes/gateways/class-wc-payment-gateway-stripe-payment-request.php:69
|
1021 |
msgstr ""
|
1022 |
|
1023 |
#: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:32
|
|
|
1024 |
msgid ""
|
1025 |
+
"By providing your IBAN and confirming this payment, you are\r\n"
|
1026 |
+
"\t\t\tauthorizing %s and Stripe, our payment service provider, to send instructions to your bank to debit your account\r\n"
|
1027 |
+
"\t\t\tand your bank to debit your account in accordance with those instructions. You are entitled to a refund from your bank under the\r\n"
|
1028 |
+
"\t\t\tterms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited."
|
|
|
|
|
|
|
|
|
1029 |
msgstr ""
|
1030 |
|
1031 |
#: includes/gateways/class-wc-payment-gateway-stripe-sepa.php:48
|
1064 |
msgstr ""
|
1065 |
|
1066 |
#: includes/gateways/class-wc-payment-gateway-stripe-wechat.php:64
|
1067 |
+
msgid "Scan the QR code using your WeChat app. Once scanned click the Place Order button."
|
|
|
|
|
1068 |
msgstr ""
|
1069 |
|
1070 |
#: includes/gateways/settings/ach-settings-v2.php:4
|
1074 |
|
1075 |
#: includes/gateways/settings/ach-settings-v2.php:4
|
1076 |
#: includes/gateways/settings/ach-settings.php:4
|
|
|
1077 |
msgid "Read through our %sdocumentation%s to configure ACH payments"
|
1078 |
msgstr ""
|
1079 |
|
1103 |
msgstr ""
|
1104 |
|
1105 |
#: includes/gateways/settings/ach-settings-v2.php:19
|
1106 |
+
msgid "This setting determines the Plaid environment you are connecting with. When you are ready to accept live transactions, switch this option to Production.<br><strong>Production</strong> - accept live ACH payments <br><strong>Development</strong> - use real bank login details with test transactions <br><strong>Sandbox</strong> - test integration using test credentials"
|
|
|
|
|
|
|
|
|
|
|
|
|
1107 |
msgstr ""
|
1108 |
|
1109 |
#: includes/gateways/settings/ach-settings-v2.php:62
|
1111 |
msgid "ACH Payment"
|
1112 |
msgstr ""
|
1113 |
|
|
|
|
|
|
|
|
|
|
|
1114 |
#: includes/gateways/settings/ach-settings-v2.php:73
|
1115 |
#: includes/gateways/settings/ach-settings.php:74
|
1116 |
msgid "Client Name"
|
1126 |
msgid "ACH Display"
|
1127 |
msgstr ""
|
1128 |
|
1129 |
+
#: includes/gateways/settings/ach-settings-v2.php:88
|
1130 |
+
#: includes/gateways/settings/ach-settings.php:89
|
1131 |
+
msgid "ACH Fee"
|
|
|
|
|
|
|
|
|
|
|
|
|
1132 |
msgstr ""
|
1133 |
|
1134 |
#: includes/gateways/settings/ach-settings-v2.php:95
|
1148 |
|
1149 |
#: includes/gateways/settings/ach-settings-v2.php:99
|
1150 |
#: includes/gateways/settings/ach-settings.php:100
|
1151 |
+
msgid "You can assign a fee to the order for ACH payments. Amount is a static amount and percentage is a percentage of the cart amount."
|
|
|
|
|
1152 |
msgstr ""
|
1153 |
|
1154 |
#: includes/gateways/settings/ach-settings.php:20
|
1155 |
+
msgid "The active Plaid environment. You must set API mode to live to use Plaid's development environment."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1156 |
msgstr ""
|
1157 |
|
1158 |
#: includes/gateways/settings/ach-settings.php:28
|
1159 |
msgid "ID that identifies your Plaid account."
|
1160 |
msgstr ""
|
1161 |
|
|
|
|
|
|
|
|
|
1162 |
#: includes/gateways/settings/ach-settings.php:34
|
1163 |
msgid "Used to identify ACH payments initiated from your site."
|
1164 |
msgstr ""
|
1165 |
|
|
|
|
|
|
|
|
|
1166 |
#: includes/gateways/settings/ach-settings.php:41
|
1167 |
msgid "Sandbox Secret"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
#: includes/gateways/settings/ach-settings.php:43
|
1171 |
+
msgid "Key that acts as a password when connecting to Plaid's sandbox environment."
|
|
|
1172 |
msgstr ""
|
1173 |
|
1174 |
#: includes/gateways/settings/ach-settings.php:47
|
1176 |
msgstr ""
|
1177 |
|
1178 |
#: includes/gateways/settings/ach-settings.php:49
|
1179 |
+
msgid "Development allows you to test real bank credentials with test transactions."
|
|
|
1180 |
msgstr ""
|
1181 |
|
1182 |
#: includes/gateways/settings/ach-settings.php:53
|
1184 |
msgstr ""
|
1185 |
|
1186 |
#: includes/gateways/settings/ach-settings.php:55
|
1187 |
+
msgid "Key that acts as a password when connecting to Plaid's production environment."
|
|
|
|
|
1188 |
msgstr ""
|
1189 |
|
1190 |
#: includes/gateways/settings/applepay-settings.php:4
|
1192 |
msgstr ""
|
1193 |
|
1194 |
#: includes/gateways/settings/applepay-settings.php:4
|
1195 |
+
msgid "This plugin attemps to add the domain association file to your server automatically when you click the Register Domain button. If that fails due to file permssions, you must add the <strong>%s.well-known/apple-developer-merchantid-domain-association%s</strong> file to your domain and register your domain within the Stripe Dashboard."
|
1196 |
+
msgstr ""
|
1197 |
+
|
1198 |
+
#: includes/gateways/settings/applepay-settings.php:4
|
1199 |
+
msgid "In order for Apple Pay to display, you must test with an iOS device and have a payment method saved in the Apple Wallet."
|
|
|
|
|
1200 |
msgstr ""
|
1201 |
|
1202 |
#: includes/gateways/settings/applepay-settings.php:10
|
1204 |
msgid "If enabled, your site can accept Apple Pay payments through Stripe."
|
1205 |
msgstr ""
|
1206 |
|
|
|
|
|
|
|
|
|
1207 |
#: includes/gateways/settings/applepay-settings.php:28
|
1208 |
#: includes/gateways/settings/cc-settings.php:28
|
1209 |
#: includes/gateways/settings/googlepay-settings.php:42
|
1214 |
#: includes/gateways/settings/applepay-settings.php:44
|
1215 |
#: includes/gateways/settings/cc-settings.php:44
|
1216 |
#: includes/gateways/settings/payment-request-settings.php:45
|
1217 |
+
msgid "This option determines whether the customer's funds are captured immediately or authorized and can be captured at a later date."
|
|
|
|
|
1218 |
msgstr ""
|
1219 |
|
1220 |
#: includes/gateways/settings/applepay-settings.php:48
|
1241 |
msgid "Top of Checkout"
|
1242 |
msgstr ""
|
1243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1244 |
#: includes/gateways/settings/applepay-settings.php:59
|
1245 |
#: includes/gateways/settings/cc-settings.php:47
|
1246 |
#: includes/gateways/settings/googlepay-settings.php:73
|
1259 |
#: includes/gateways/settings/cc-settings.php:54
|
1260 |
#: includes/gateways/settings/googlepay-settings.php:80
|
1261 |
#: includes/gateways/settings/payment-request-settings.php:67
|
1262 |
+
msgid "This is the status of the order once payment is complete. If <b>Default</b> is selected, then WooCommerce will set the order status automatically based on internal logic which states if a product is virtual and downloadable then status is set to complete. Products that require shipping are set to Processing. Default is the recommended setting as it allows standard WooCommerce code to process the order status."
|
|
|
|
|
|
|
|
|
|
|
|
|
1263 |
msgstr ""
|
1264 |
|
1265 |
#: includes/gateways/settings/applepay-settings.php:69
|
1317 |
msgstr ""
|
1318 |
|
1319 |
#: includes/gateways/settings/cc-settings.php:10
|
|
|
1320 |
msgid "%sTest cards%s"
|
1321 |
msgstr ""
|
1322 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1323 |
#: includes/gateways/settings/cc-settings.php:58
|
1324 |
msgid "Allow Credit Card Save"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
#: includes/gateways/settings/cc-settings.php:60
|
1328 |
+
msgid "If enabled, a checkbox will be available on the checkout page allowing your customers to save their credit card. The payment methods are stored securely in Stripe's vault and never touch your server. Note: if the cart contains a subscription, there will be no checkbox because the payment method will be saved automatically. There will also be no checkbox for guest checkout as a user must be logged in to save a payment method."
|
|
|
|
|
|
|
|
|
|
|
|
|
1329 |
msgstr ""
|
1330 |
|
1331 |
#: includes/gateways/settings/cc-settings.php:63
|
1333 |
msgstr ""
|
1334 |
|
1335 |
#: includes/gateways/settings/cc-settings.php:66
|
1336 |
+
msgid "Stripe internally determines when 3D secure should be presented based on their SCA engine. If <strong>Force 3D Secure</strong> is enabled, 3D Secure will be forced for ALL credit card transactions. In test mode 3D secure only shows for %s3DS Test Cards%s regardless of this setting."
|
|
|
|
|
|
|
|
|
|
|
1337 |
msgstr ""
|
1338 |
|
1339 |
#: includes/gateways/settings/cc-settings.php:69
|
1341 |
msgstr ""
|
1342 |
|
1343 |
#: includes/gateways/settings/cc-settings.php:72
|
1344 |
+
msgid "If enabled, credit card errors will be generic when presented to the customer. Merchants may prefer to not provide details on why a card was not accepted for security purposes."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1345 |
msgstr ""
|
1346 |
|
1347 |
#: includes/gateways/settings/cc-settings.php:93
|
1361 |
msgstr ""
|
1362 |
|
1363 |
#: includes/gateways/settings/cc-settings.php:102
|
1364 |
+
msgid "The Stripe form option displays a CC form rendered by Stripe. It works well with most themes. The custom card forms are offered if you want more options on the CC form design."
|
|
|
|
|
|
|
1365 |
msgstr ""
|
1366 |
|
1367 |
#: includes/gateways/settings/cc-settings.php:105
|
1377 |
msgstr ""
|
1378 |
|
1379 |
#: includes/gateways/settings/cc-settings.php:120
|
1380 |
+
msgid "If enabled, the CC form will show the postal code on the checkout page. If disabled, the billing field's postal code will be used. The postal code will show on the Add Payment Method page for security reasons."
|
|
|
|
|
|
|
1381 |
msgstr ""
|
1382 |
|
1383 |
#: includes/gateways/settings/googlepay-settings.php:4
|
1385 |
msgstr ""
|
1386 |
|
1387 |
#: includes/gateways/settings/googlepay-settings.php:4
|
1388 |
+
msgid "When test mode is enabled, Google Pay will work without a merchant ID, allowing you to capture the necessary screenshots the Google API team needs to approve your integration request."
|
|
|
|
|
|
|
1389 |
msgstr ""
|
1390 |
|
1391 |
#: includes/gateways/settings/googlepay-settings.php:7
|
1392 |
+
msgid "If you don't want to request a Google Merchant ID, you can use the %sPayment Request Gateway%s which has a Google Pay integration through Stripe via the Chrome browser."
|
|
|
|
|
|
|
|
|
1393 |
msgstr ""
|
1394 |
|
1395 |
#: includes/gateways/settings/googlepay-settings.php:13
|
1401 |
msgstr ""
|
1402 |
|
1403 |
#: includes/gateways/settings/googlepay-settings.php:22
|
1404 |
+
msgid "If enabled, the Google Payment sheet will show the order line items. You must have Google whitelist you for callback intents."
|
|
|
|
|
1405 |
msgstr ""
|
1406 |
|
1407 |
#: includes/gateways/settings/googlepay-settings.php:25
|
1409 |
msgstr ""
|
1410 |
|
1411 |
#: includes/gateways/settings/googlepay-settings.php:27
|
1412 |
+
msgid "Your Google Merchant ID is given to you by the Google API team once you register for Google Pay. While testing in TEST mode you can leave this value blank and Google Pay will work."
|
|
|
|
|
|
|
1413 |
msgstr ""
|
1414 |
|
1415 |
#: includes/gateways/settings/googlepay-settings.php:58
|
1416 |
+
msgid "This option determines whether the customer's funds are capture immediately or authorized and can be captured at a later date."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1417 |
msgstr ""
|
1418 |
|
1419 |
#: includes/gateways/settings/googlepay-settings.php:83
|
1421 |
msgstr ""
|
1422 |
|
1423 |
#: includes/gateways/settings/googlepay-settings.php:85
|
1424 |
+
msgid "The name of your business as it appears on the Google Pay payment sheet."
|
|
|
1425 |
msgstr ""
|
1426 |
|
1427 |
#: includes/gateways/settings/googlepay-settings.php:89
|
1437 |
msgstr ""
|
1438 |
|
1439 |
#: includes/gateways/settings/googlepay-settings.php:96
|
1440 |
+
msgid "This is the icon style that appears next to the gateway on the checkout page. Google's API team typically requires the With Outline option on the checkout page for branding purposes."
|
|
|
|
|
|
|
1441 |
msgstr ""
|
1442 |
|
1443 |
#: includes/gateways/settings/googlepay-settings.php:99
|
1477 |
msgstr ""
|
1478 |
|
1479 |
#: includes/gateways/settings/googlepay-settings.php:124
|
1480 |
+
msgid "If you can't see the Google Pay button, try switching to a Chrome browser."
|
|
|
1481 |
msgstr ""
|
1482 |
|
1483 |
#: includes/gateways/settings/payment-request-settings.php:4
|
1484 |
msgid ""
|
1485 |
+
"The PaymentRequest gateway uses your customer's browser to render payment options like Google Pay and Microsoft Pay. You can either use the Google Pay gateway for example, or this gateway.\r\n"
|
1486 |
+
"\t\t\t\t\t\tThe difference is this gateway uses Stripe's PaymentRequest Button rather than render a Google Pay specific button."
|
|
|
|
|
|
|
1487 |
msgstr ""
|
1488 |
|
1489 |
#: includes/gateways/settings/payment-request-settings.php:18
|
1576 |
msgid "Gateway Title"
|
1577 |
msgstr ""
|
1578 |
|
1579 |
+
#: includes/updates/update-3.1.0.php:31
|
1580 |
+
#: includes/updates/update-3.1.0.php:60
|
1581 |
msgid "Stripe For WooCommerce Update"
|
1582 |
msgstr ""
|
1583 |
|
1586 |
msgstr ""
|
1587 |
|
1588 |
#: includes/updates/update-3.1.0.php:34
|
1589 |
+
msgid "At Stripe's request, we have updated Stripe for WooCommerce to use the new Stripe Connect integration. This new integration offers even more security. Stripe is requesting that all merchants switch."
|
|
|
|
|
|
|
1590 |
msgstr ""
|
1591 |
|
1592 |
#: includes/updates/update-3.1.0.php:35
|
1593 |
+
msgid "Click %shere%s to be redirected to your Stripe API settings page then click the <strong>Click to Connect</strong> button."
|
|
|
|
|
|
|
1594 |
msgstr ""
|
1595 |
|
1596 |
#: includes/updates/update-3.1.0.php:44
|
1597 |
msgid "Kind Regards,"
|
1598 |
msgstr ""
|
1599 |
|
1600 |
+
#: includes/wc-stripe-functions.php:733
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1601 |
msgid "Bootstrap form"
|
1602 |
msgstr ""
|
1603 |
|
1604 |
+
#: includes/wc-stripe-functions.php:767
|
1605 |
msgid "Simple form"
|
1606 |
msgstr ""
|
1607 |
|
1608 |
+
#: includes/wc-stripe-functions.php:800
|
1609 |
msgid "Minimalist form"
|
1610 |
msgstr ""
|
1611 |
|
1612 |
+
#: includes/wc-stripe-functions.php:834
|
1613 |
msgid "Inline Form"
|
1614 |
msgstr ""
|
1615 |
|
1616 |
+
#: includes/wc-stripe-functions.php:870
|
1617 |
msgid "Rounded Form"
|
1618 |
msgstr ""
|
1619 |
|
1620 |
+
#: includes/wc-stripe-functions.php:1078
|
1621 |
msgid "There was an error processing your credit card."
|
1622 |
msgstr ""
|
1623 |
|
1624 |
+
#: includes/wc-stripe-functions.php:1079
|
1625 |
+
msgid "Your card number is incomplete."
|
|
|
|
|
1626 |
msgstr ""
|
1627 |
|
1628 |
+
#: includes/wc-stripe-functions.php:1080
|
1629 |
+
msgid "The card number is incorrect. Check the card's number or use a different card."
|
|
|
|
|
1630 |
msgstr ""
|
1631 |
|
1632 |
+
#: includes/wc-stripe-functions.php:1081
|
1633 |
+
msgid "The card's security code is incorrect. Check the card's security code or use a different card."
|
|
|
|
|
1634 |
msgstr ""
|
1635 |
|
1636 |
+
#: includes/wc-stripe-functions.php:1082
|
1637 |
+
msgid "The card's ZIP code is incorrect. Check the card's ZIP code or use a different card."
|
|
|
1638 |
msgstr ""
|
1639 |
|
1640 |
+
#: includes/wc-stripe-functions.php:1083
|
1641 |
+
#: includes/wc-stripe-functions.php:1088
|
1642 |
+
msgid "The card number is invalid. Check the card details or use a different card."
|
|
|
1643 |
msgstr ""
|
1644 |
|
1645 |
+
#: includes/wc-stripe-functions.php:1084
|
1646 |
+
msgid "This value provided to the field contains characters that are unsupported by the field."
|
|
|
|
|
1647 |
msgstr ""
|
1648 |
|
1649 |
+
#: includes/wc-stripe-functions.php:1085
|
1650 |
+
msgid "The card's security code is invalid. Check the card's security code or use a different card."
|
|
|
|
|
1651 |
msgstr ""
|
1652 |
|
1653 |
+
#: includes/wc-stripe-functions.php:1086
|
1654 |
+
msgid "The card's expiration month is incorrect. Check the expiration date or use a different card."
|
|
|
|
|
1655 |
msgstr ""
|
1656 |
|
1657 |
+
#: includes/wc-stripe-functions.php:1087
|
1658 |
+
msgid "The card's expiration year is incorrect. Check the expiration date or use a different card."
|
|
|
|
|
1659 |
msgstr ""
|
1660 |
|
1661 |
+
#: includes/wc-stripe-functions.php:1089
|
1662 |
+
msgid "The card's address is incorrect. Check the card's address or use a different card."
|
|
|
1663 |
msgstr ""
|
1664 |
|
1665 |
+
#: includes/wc-stripe-functions.php:1090
|
1666 |
+
msgid "The card has expired. Check the expiration date or use a different card."
|
1667 |
+
msgstr ""
|
1668 |
+
|
1669 |
+
#: includes/wc-stripe-functions.php:1091
|
1670 |
msgid "The card has been declined."
|
1671 |
msgstr ""
|
1672 |
|
1673 |
+
#: includes/wc-stripe-functions.php:1092
|
1674 |
msgid "Your card's expiration year is in the past."
|
1675 |
msgstr ""
|
1676 |
|
1677 |
+
#: includes/wc-stripe-functions.php:1093
|
1678 |
+
msgid "The bank account number provided is invalid (e.g., missing digits). Bank account information varies from country to country. We recommend creating validations in your entry forms based on the bank account formats we provide."
|
|
|
|
|
|
|
1679 |
msgstr ""
|
1680 |
|
1681 |
+
#: includes/wc-stripe-functions.php:1094
|
1682 |
+
msgid "The specified amount is greater than the maximum amount allowed. Use a lower amount and try again."
|
|
|
|
|
1683 |
msgstr ""
|
1684 |
|
1685 |
+
#: includes/wc-stripe-functions.php:1095
|
1686 |
+
msgid "The specified amount is less than the minimum amount allowed. Use a higher amount and try again."
|
|
|
|
|
1687 |
msgstr ""
|
1688 |
|
1689 |
+
#: includes/wc-stripe-functions.php:1096
|
1690 |
+
msgid "The payment requires authentication to proceed. If your customer is off session, notify your customer to return to your application and complete the payment. If you provided the error_on_requires_action parameter, then your customer should try another card that does not require authentication."
|
|
|
|
|
|
|
|
|
1691 |
msgstr ""
|
1692 |
|
1693 |
+
#: includes/wc-stripe-functions.php:1097
|
1694 |
+
msgid "The transfer or payout could not be completed because the associated account does not have a sufficient balance available. Create a new transfer or payout using an amount less than or equal to the account's available balance."
|
|
|
|
|
|
|
1695 |
msgstr ""
|
1696 |
|
1697 |
+
#: includes/wc-stripe-functions.php:1098
|
1698 |
+
msgid "The bank account provided can not be used to charge, either because it is not verified yet or it is not supported."
|
|
|
|
|
1699 |
msgstr ""
|
1700 |
|
1701 |
+
#: includes/wc-stripe-functions.php:1099
|
1702 |
+
msgid "The bank account provided already exists on the specified Customer object. If the bank account should also be attached to a different customer, include the correct customer ID when making the request again."
|
|
|
|
|
|
|
1703 |
msgstr ""
|
1704 |
|
1705 |
+
#: includes/wc-stripe-functions.php:1100
|
1706 |
+
msgid "The bank account provided cannot be used for payouts. A different bank account must be used."
|
|
|
|
|
1707 |
msgstr ""
|
1708 |
|
1709 |
+
#: includes/wc-stripe-functions.php:1101
|
1710 |
+
msgid "Your Connect platform is attempting to share an unverified bank account with a connected account."
|
|
|
|
|
1711 |
msgstr ""
|
1712 |
|
1713 |
+
#: includes/wc-stripe-functions.php:1102
|
1714 |
+
msgid "The bank account cannot be verified, either because the microdeposit amounts provided do not match the actual amounts, or because verification has failed too many times."
|
|
|
|
|
|
|
1715 |
msgstr ""
|
1716 |
|
1717 |
+
#: includes/wc-stripe-functions.php:1103
|
1718 |
+
msgid "This card has been declined too many times. You can try to charge this card again after 24 hours. We suggest reaching out to your customer to make sure they have entered all of their information correctly and that there are no issues with their card."
|
|
|
|
|
|
|
|
|
1719 |
msgstr ""
|
1720 |
|
1721 |
+
#: includes/wc-stripe-functions.php:1104
|
1722 |
+
msgid "The charge you're attempting to capture has already been captured. Update the request with an uncaptured charge ID."
|
|
|
|
|
1723 |
msgstr ""
|
1724 |
|
1725 |
+
#: includes/wc-stripe-functions.php:1105
|
1726 |
+
msgid "The charge you're attempting to refund has already been refunded. Update the request to use the ID of a charge that has not been refunded."
|
|
|
|
|
1727 |
msgstr ""
|
1728 |
|
1729 |
+
#: includes/wc-stripe-functions.php:1106
|
1730 |
+
msgid "The charge you're attempting to refund has been charged back. Check the disputes documentation to learn how to respond to the dispute."
|
|
|
|
|
1731 |
msgstr ""
|
1732 |
|
1733 |
+
#: includes/wc-stripe-functions.php:1107
|
1734 |
+
msgid "This charge would cause you to exceed your rolling-window processing limit for this source type. Please retry the charge later, or contact us to request a higher processing limit."
|
|
|
|
|
|
|
1735 |
msgstr ""
|
1736 |
|
1737 |
+
#: includes/wc-stripe-functions.php:1108
|
1738 |
+
msgid "The charge cannot be captured as the authorization has expired. Auth and capture charges must be captured within seven days."
|
|
|
|
|
1739 |
msgstr ""
|
1740 |
|
1741 |
+
#: includes/wc-stripe-functions.php:1109
|
1742 |
+
msgid "One or more provided parameters was not allowed for the given operation on the Charge. Check our API reference or the returned error message to see which values were not correct for that Charge."
|
|
|
|
|
|
|
1743 |
msgstr ""
|
1744 |
|
1745 |
+
#: includes/wc-stripe-functions.php:1110
|
1746 |
+
msgid "The email address is invalid (e.g., not properly formatted). Check that the email address is properly formatted and only includes allowed characters."
|
|
|
|
|
1747 |
msgstr ""
|
1748 |
|
1749 |
+
#: includes/wc-stripe-functions.php:1111
|
1750 |
+
msgid "The idempotency key provided is currently being used in another request. This occurs if your integration is making duplicate requests simultaneously."
|
|
|
|
|
1751 |
msgstr ""
|
1752 |
|
1753 |
+
#: includes/wc-stripe-functions.php:1112
|
1754 |
+
msgid "The specified amount is invalid. The charge amount must be a positive integer in the smallest currency unit, and not exceed the minimum or maximum amount."
|
|
|
|
|
|
|
1755 |
msgstr ""
|
1756 |
|
1757 |
+
#: includes/wc-stripe-functions.php:1113
|
1758 |
+
msgid "The source cannot be used because it is not in the correct state (e.g., a charge request is trying to use a source with a pending, failed, or consumed source). Check the status of the source you are attempting to use."
|
|
|
|
|
|
|
1759 |
msgstr ""
|
1760 |
|
1761 |
+
#: includes/wc-stripe-functions.php:1114
|
1762 |
+
msgid "Both a customer and source ID have been provided, but the source has not been saved to the customer. To create a charge for a customer with a specified source, you must first save the card details."
|
|
|
|
|
|
|
1763 |
msgstr ""
|
1764 |
|
1765 |
+
#: includes/wc-stripe-functions.php:1115
|
1766 |
msgid "The ZIP code provided was incorrect."
|
1767 |
msgstr ""
|
1768 |
|
1769 |
+
#: includes/wc-stripe-functions.php:1116
|
1770 |
+
msgid "An error occurred while processing the card. Try again later or with a different payment method."
|
|
|
|
|
1771 |
msgstr ""
|
1772 |
|
1773 |
+
#: includes/wc-stripe-functions.php:1117
|
1774 |
msgid "The card does not support this type of purchase."
|
1775 |
msgstr ""
|
1776 |
|
1777 |
+
#: includes/wc-stripe-functions.php:1118
|
1778 |
+
#: includes/wc-stripe-functions.php:1121
|
1779 |
+
#: includes/wc-stripe-functions.php:1123
|
1780 |
msgid "The card has been declined for an unknown reason."
|
1781 |
msgstr ""
|
1782 |
|
1783 |
+
#: includes/wc-stripe-functions.php:1119
|
1784 |
+
msgid "The customer has exceeded the balance or credit limit available on their card."
|
|
|
|
|
1785 |
msgstr ""
|
1786 |
|
1787 |
+
#: includes/wc-stripe-functions.php:1120
|
1788 |
msgid "The card does not support the specified currency."
|
1789 |
msgstr ""
|
1790 |
|
1791 |
+
#: includes/wc-stripe-functions.php:1122
|
1792 |
msgid "The payment has been declined as Stripe suspects it is fraudulent."
|
1793 |
msgstr ""
|
1794 |
|
1795 |
+
#: includes/wc-stripe-functions.php:1124
|
1796 |
msgid "The PIN entered is incorrect. "
|
1797 |
msgstr ""
|
1798 |
|
1799 |
+
#: includes/wc-stripe-functions.php:1125
|
1800 |
msgid "The card has insufficient funds to complete the purchase."
|
1801 |
msgstr ""
|
1802 |
|
1809 |
msgstr ""
|
1810 |
|
1811 |
#: stripe-payments.php:17
|
|
|
1812 |
msgid "Your PHP version is %s but Stripe requires version 5.4+."
|
1813 |
msgstr ""
|
1814 |
|
1815 |
+
#: templates/cart/payment-methods.php:13
|
1816 |
+
#: templates/cart/payment-methods.php:28
|
1817 |
msgid "or"
|
1818 |
msgstr ""
|
1819 |
|
1820 |
+
#: templates/cc-forms/bootstrap.php:10
|
1821 |
+
#: templates/cc-forms/inline.php:9
|
1822 |
+
#: templates/cc-forms/minimalist.php:22
|
1823 |
+
#: templates/cc-forms/simple.php:12
|
1824 |
msgid "Card Number"
|
1825 |
msgstr ""
|
1826 |
|
1827 |
+
#: templates/cc-forms/bootstrap.php:20
|
1828 |
+
#: templates/cc-forms/inline.php:17
|
1829 |
+
#: templates/cc-forms/minimalist.php:30
|
1830 |
+
#: templates/cc-forms/simple.php:26
|
1831 |
msgid "CVV"
|
1832 |
msgstr ""
|
1833 |
|
1834 |
+
#: templates/cc-forms/bootstrap.php:25
|
1835 |
+
#: templates/cc-forms/inline.php:22
|
1836 |
#: templates/cc-forms/simple.php:34
|
1837 |
msgid "ZIP"
|
1838 |
msgstr ""
|
includes/abstract/abstract-wc-payment-gateway-stripe-local-payment.php
CHANGED
@@ -83,6 +83,18 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
83 |
];
|
84 |
}
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
/**
|
87 |
* Return an array of form fields for the gateway.
|
88 |
*
|
@@ -126,7 +138,10 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
126 |
'_payment_nonce' => wp_create_nonce ( 'local-payment' ),
|
127 |
'wc-stripe-local-gateway' => $this->id
|
128 |
], wc_get_checkout_url () ),
|
129 |
-
'element_params' => $this->get_element_params ()
|
|
|
|
|
|
|
130 |
] );
|
131 |
}
|
132 |
|
@@ -175,18 +190,36 @@ abstract class WC_Payment_Gateway_Stripe_Local_Payment extends WC_Payment_Gatewa
|
|
175 |
* @return string
|
176 |
*/
|
177 |
protected function get_local_payment_return_url($order) {
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
return add_query_arg ( [
|
179 |
'_payment_nonce' => wp_create_nonce ( 'local-payment' ),
|
180 |
'wc-stripe-local-gateway' => $this->id
|
181 |
-
],
|
182 |
}
|
183 |
|
184 |
public function is_local_payment_available() {
|
185 |
-
|
186 |
-
|
|
|
|
|
|
|
187 |
} else {
|
|
|
188 |
$customer = WC ()->customer;
|
189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
}
|
191 |
}
|
192 |
|
83 |
];
|
84 |
}
|
85 |
|
86 |
+
public function process_payment($order_id) {
|
87 |
+
$result = parent::process_payment ( $order_id );
|
88 |
+
|
89 |
+
if (defined ( WC_Stripe_Constants::WOOCOMMERCE_STRIPE_ORDER_PAY ) && $result[ 'result' ] == 'success') {
|
90 |
+
wp_send_json ( [ 'success' => true,
|
91 |
+
'redirect' => $result[ 'redirect' ]
|
92 |
+
], 200 );
|
93 |
+
exit ();
|
94 |
+
}
|
95 |
+
return $result;
|
96 |
+
}
|
97 |
+
|
98 |
/**
|
99 |
* Return an array of form fields for the gateway.
|
100 |
*
|
138 |
'_payment_nonce' => wp_create_nonce ( 'local-payment' ),
|
139 |
'wc-stripe-local-gateway' => $this->id
|
140 |
], wc_get_checkout_url () ),
|
141 |
+
'element_params' => $this->get_element_params (),
|
142 |
+
'routes' => [
|
143 |
+
'order_pay' => wc_stripe ()->rest_api->checkout->rest_url ( 'order-pay' )
|
144 |
+
]
|
145 |
] );
|
146 |
}
|
147 |
|
190 |
* @return string
|
191 |
*/
|
192 |
protected function get_local_payment_return_url($order) {
|
193 |
+
global $wp;
|
194 |
+
if (isset ( $wp->query_vars[ 'order-pay' ] )) {
|
195 |
+
$url = $order->get_checkout_payment_url ();
|
196 |
+
} else {
|
197 |
+
$url = wc_get_checkout_url ();
|
198 |
+
}
|
199 |
return add_query_arg ( [
|
200 |
'_payment_nonce' => wp_create_nonce ( 'local-payment' ),
|
201 |
'wc-stripe-local-gateway' => $this->id
|
202 |
+
], $url );
|
203 |
}
|
204 |
|
205 |
public function is_local_payment_available() {
|
206 |
+
global $wp;
|
207 |
+
if (isset ( $wp->query_vars[ 'order-pay' ] )) {
|
208 |
+
$order = wc_get_order ( absint ( $wp->query_vars[ 'order-pay' ] ) );
|
209 |
+
$currency = $order->get_currency ();
|
210 |
+
$billing_country = $order->get_billing_country ();
|
211 |
} else {
|
212 |
+
$currency = get_woocommerce_currency ();
|
213 |
$customer = WC ()->customer;
|
214 |
+
$billing_country = $customer ? $customer->get_billing_country () : null;
|
215 |
+
if (! $billing_country) {
|
216 |
+
$billing_country = WC ()->countries->get_base_country ();
|
217 |
+
}
|
218 |
+
}
|
219 |
+
if (empty ( $this->countries )) {
|
220 |
+
return in_array ( $currency, $this->currencies );
|
221 |
+
} else {
|
222 |
+
return $billing_country && in_array ( $currency, $this->currencies ) && in_array ( $billing_country, $this->countries );
|
223 |
}
|
224 |
}
|
225 |
|
includes/abstract/abstract-wc-payment-gateway-stripe.php
CHANGED
@@ -354,9 +354,11 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
354 |
|
355 |
$this->trigger_post_payment_processes ( $order, $this );
|
356 |
|
357 |
-
|
|
|
|
|
358 |
'redirect' => $order->get_checkout_order_received_url ()
|
359 |
-
|
360 |
} else {
|
361 |
return [ 'result' => 'success',
|
362 |
'redirect' => $result->redirect
|
@@ -1296,4 +1298,12 @@ abstract class WC_Payment_Gateway_Stripe extends WC_Payment_Gateway {
|
|
1296 |
}
|
1297 |
return null != $result ? $result->get_error_message () : __ ( 'Cannot process payment', 'woo-stripe-payment' );
|
1298 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1299 |
}
|
354 |
|
355 |
$this->trigger_post_payment_processes ( $order, $this );
|
356 |
|
357 |
+
WC ()->cart->empty_cart ();
|
358 |
+
|
359 |
+
return [ 'result' => 'success',
|
360 |
'redirect' => $order->get_checkout_order_received_url ()
|
361 |
+
];
|
362 |
} else {
|
363 |
return [ 'result' => 'success',
|
364 |
'redirect' => $result->redirect
|
1298 |
}
|
1299 |
return null != $result ? $result->get_error_message () : __ ( 'Cannot process payment', 'woo-stripe-payment' );
|
1300 |
}
|
1301 |
+
|
1302 |
+
/**
|
1303 |
+
*
|
1304 |
+
* @since 3.1.2
|
1305 |
+
*/
|
1306 |
+
private function get_payment_section_description() {
|
1307 |
+
return sprintf ( __ ( 'Increase your conversion rate by offering %1$s on your Product and Cart pages, or at the top of the checkout page. <br/><strong>Note:</strong> you can control which products display %s by going to the product edit page.', 'woo-stripe-payment' ), $this->get_method_title () );
|
1308 |
+
}
|
1309 |
}
|
includes/admin/class-wc-stripe-admin-assets.php
CHANGED
@@ -40,6 +40,11 @@ class WC_Stripe_Admin_Assets {
|
|
40 |
wp_register_script ( 'wc-stripe-meta-boxes-subscription', $js_path . 'admin/meta-boxes-subscription.js', array(
|
41 |
'jquery', 'jquery-blockui'
|
42 |
), wc_stripe ()->version, true );
|
|
|
|
|
|
|
|
|
|
|
43 |
wp_register_style ( 'wc-stripe-admin-style', $css_path . 'admin/admin.css', array(), wc_stripe ()->version );
|
44 |
|
45 |
if (strpos ( $screen_id, 'wc-settings' ) !== false) {
|
@@ -61,6 +66,17 @@ class WC_Stripe_Admin_Assets {
|
|
61 |
if ($screen_id === 'shop_order') {
|
62 |
wp_enqueue_style ( 'wc-stripe-admin-style' );
|
63 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
}
|
65 |
|
66 |
public static function localize_scripts() {
|
40 |
wp_register_script ( 'wc-stripe-meta-boxes-subscription', $js_path . 'admin/meta-boxes-subscription.js', array(
|
41 |
'jquery', 'jquery-blockui'
|
42 |
), wc_stripe ()->version, true );
|
43 |
+
wp_register_script ( 'wc-stripe-product-data', $js_path . 'admin/meta-boxes-product-data.js', array(
|
44 |
+
'jquery', 'jquery-blockui',
|
45 |
+
'jquery-ui-sortable', 'jquery-ui-widget',
|
46 |
+
'jquery-ui-core', 'jquery-tiptip'
|
47 |
+
), wc_stripe ()->version (), true );
|
48 |
wp_register_style ( 'wc-stripe-admin-style', $css_path . 'admin/admin.css', array(), wc_stripe ()->version );
|
49 |
|
50 |
if (strpos ( $screen_id, 'wc-settings' ) !== false) {
|
66 |
if ($screen_id === 'shop_order') {
|
67 |
wp_enqueue_style ( 'wc-stripe-admin-style' );
|
68 |
}
|
69 |
+
if ($screen_id === 'product') {
|
70 |
+
wp_enqueue_script ( 'wc-stripe-product-data' );
|
71 |
+
wp_enqueue_style ( 'wc-stripe-admin-style' );
|
72 |
+
wp_localize_script ( 'wc-stripe-product-data', 'wc_stripe_product_params', [
|
73 |
+
'_wpnonce' => wp_create_nonce ( 'wp_rest' ),
|
74 |
+
'routes' => [
|
75 |
+
'enable_gateway' => wc_stripe ()->rest_api->product_data->rest_url ( 'gateway' ),
|
76 |
+
'save' => wc_stripe ()->rest_api->product_data->rest_url ( 'save' )
|
77 |
+
]
|
78 |
+
] );
|
79 |
+
}
|
80 |
}
|
81 |
|
82 |
public static function localize_scripts() {
|
includes/admin/class-wc-stripe-admin-settings.php
CHANGED
@@ -34,6 +34,9 @@ class WC_Stripe_Admin_Settings {
|
|
34 |
add_action ( 'woocommerce_update_options_checkout', array(
|
35 |
__CLASS__, 'deprecated_save'
|
36 |
) );
|
|
|
|
|
|
|
37 |
}
|
38 |
|
39 |
public static function output() {
|
@@ -81,5 +84,21 @@ class WC_Stripe_Admin_Settings {
|
|
81 |
global $current_section, $wc_stripe_subsection;
|
82 |
do_action ( 'wc_stripe_settings_before_options_' . $current_section . '_' . $wc_stripe_subsection );
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
WC_Stripe_Admin_Settings::init ();
|
34 |
add_action ( 'woocommerce_update_options_checkout', array(
|
35 |
__CLASS__, 'deprecated_save'
|
36 |
) );
|
37 |
+
add_filter ( 'woocommerce_get_settings_email', array(
|
38 |
+
__CLASS__, 'get_email_settings'
|
39 |
+
) );
|
40 |
}
|
41 |
|
42 |
public static function output() {
|
84 |
global $current_section, $wc_stripe_subsection;
|
85 |
do_action ( 'wc_stripe_settings_before_options_' . $current_section . '_' . $wc_stripe_subsection );
|
86 |
}
|
87 |
+
|
88 |
+
public static function get_email_settings($settings) {
|
89 |
+
$settings[] = [ 'type' => 'title',
|
90 |
+
'title' => __ ( 'Stripe Email Options', 'woo-stripe-payment' )
|
91 |
+
];
|
92 |
+
$settings[] = [ 'type' => 'checkbox',
|
93 |
+
'title' => __ ( 'Email Receipt', 'woo-stripe-payment' ),
|
94 |
+
'id' => 'woocommerce_stripe_email_receipt',
|
95 |
+
'autoload' => false,
|
96 |
+
'desc' => __ ( 'If enabled, an email receipt will be sent to the customer by Stripe when the order is processed.', 'woo-stripe-payment' )
|
97 |
+
];
|
98 |
+
$settings[] = [ 'type' => 'sectionend',
|
99 |
+
'id' => 'stripe_email'
|
100 |
+
];
|
101 |
+
return $settings;
|
102 |
+
}
|
103 |
}
|
104 |
WC_Stripe_Admin_Settings::init ();
|
includes/admin/meta-boxes/class-wc-stripe-admin-meta-box-product-data.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace PaymentPlugins;
|
4 |
+
|
5 |
+
class WC_Stripe_Admin_Meta_Box_Product_Data {
|
6 |
+
|
7 |
+
private static $_gateways = [];
|
8 |
+
|
9 |
+
private static $_options = [];
|
10 |
+
|
11 |
+
public static function init() {
|
12 |
+
add_filter ( 'woocommerce_product_data_tabs', [
|
13 |
+
__CLASS__, 'product_data_tabs'
|
14 |
+
] );
|
15 |
+
add_action ( 'woocommerce_product_data_panels', [
|
16 |
+
__CLASS__, 'output_panel'
|
17 |
+
] );
|
18 |
+
add_action ( 'woocommerce_admin_process_product_object', [
|
19 |
+
__CLASS__, 'save'
|
20 |
+
] );
|
21 |
+
}
|
22 |
+
|
23 |
+
public static function product_data_tabs($tabs) {
|
24 |
+
$tabs[ 'stripe' ] = [
|
25 |
+
'label' => __ ( 'Stripe Settings', 'woo-stripe-payment' ),
|
26 |
+
'target' => 'stripe_product_data',
|
27 |
+
'class' => [], 'priority' => 100
|
28 |
+
];
|
29 |
+
return $tabs;
|
30 |
+
}
|
31 |
+
|
32 |
+
public static function output_panel() {
|
33 |
+
global $product_object;
|
34 |
+
|
35 |
+
self::init_gateways ( $product_object );
|
36 |
+
|
37 |
+
include 'views/html-product-data.php';
|
38 |
+
}
|
39 |
+
|
40 |
+
private static function init_gateways($product) {
|
41 |
+
$order = $product->get_meta ( \WC_Stripe_Constants::PRODUCT_GATEWAY_ORDER );
|
42 |
+
$order = ! $order ? [] : $order;
|
43 |
+
foreach ( WC ()->payment_gateways ()->payment_gateways () as $gateway ) {
|
44 |
+
if ($gateway->supports ( 'wc_stripe_product_checkout' )) {
|
45 |
+
if (isset ( $order[ $gateway->id ] )) {
|
46 |
+
self::$_gateways[ $order[ $gateway->id ] ] = $gateway;
|
47 |
+
} else {
|
48 |
+
self::$_gateways[] = $gateway;
|
49 |
+
}
|
50 |
+
self::$_options[ $gateway->id ] = new \WC_Stripe_Product_Gateway_Option ( $product, $gateway );
|
51 |
+
}
|
52 |
+
}
|
53 |
+
ksort ( self::$_gateways );
|
54 |
+
}
|
55 |
+
|
56 |
+
private static function get_product_option($gateway_id) {
|
57 |
+
return self::$_options[ $gateway_id ];
|
58 |
+
}
|
59 |
+
|
60 |
+
private static function get_payment_gateways() {
|
61 |
+
foreach ( self::$_gateways as $gateway ) {
|
62 |
+
$gateways[ $gateway->id ] = $gateway;
|
63 |
+
}
|
64 |
+
return $gateways;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
*
|
69 |
+
* @param \WC_Product $product
|
70 |
+
*/
|
71 |
+
public static function save($product) {
|
72 |
+
$loop = 0;
|
73 |
+
$order = [];
|
74 |
+
self::init_gateways ( $product );
|
75 |
+
$payment_gateways = self::get_payment_gateways ();
|
76 |
+
|
77 |
+
if (isset ( $_POST[ 'stripe_gateway_order' ] )) {
|
78 |
+
foreach ( $_POST[ 'stripe_gateway_order' ] as $i => $gateway ) {
|
79 |
+
$order[ $gateway ] = $loop;
|
80 |
+
if (isset ( $_POST[ 'stripe_capture_type' ] )) {
|
81 |
+
self::get_product_option ( $gateway )->set_option ( 'charge_type', $_POST[ 'stripe_capture_type' ][ $i ] );
|
82 |
+
self::get_product_option ( $gateway )->save ();
|
83 |
+
}
|
84 |
+
$loop ++;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
if (isset ( $_POST[ '_stripe_button_position' ] )) {
|
88 |
+
$product->update_meta_data ( '_stripe_button_position', wc_clean ( $_POST[ '_stripe_button_position' ] ) );
|
89 |
+
}
|
90 |
+
$product->update_meta_data ( \WC_Stripe_Constants::PRODUCT_GATEWAY_ORDER, $order );
|
91 |
+
}
|
92 |
+
}
|
93 |
+
\PaymentPlugins\WC_Stripe_Admin_Meta_Box_Product_Data::init ();
|
includes/admin/meta-boxes/views/html-product-data.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="stripe_product_data"
|
2 |
+
class="panel woocommerce_stripe_panel woocommerce_options_panel hidden">
|
3 |
+
<p>
|
4 |
+
<?php _e('In this section you can control which gateways are displayed on the product page.', 'woo-stripe-payment')?>
|
5 |
+
</p>
|
6 |
+
<div class="options_group">
|
7 |
+
<table class="wc-stripe-product-table wc_gateways">
|
8 |
+
<thead>
|
9 |
+
<tr>
|
10 |
+
<th></th>
|
11 |
+
<th><?php _e('Method', 'woo-stripe-payment')?></th>
|
12 |
+
<th><?php _e('Enabled', 'woo-stripe-payment')?></th>
|
13 |
+
<th><?php _e('Charge Type', 'woo-stripe-payment')?>
|
14 |
+
</thead>
|
15 |
+
<tbody class="ui-sortable">
|
16 |
+
<?php foreach(self::get_payment_gateways() as $gateway):?>
|
17 |
+
<tr data-gateway_id="<?php echo $gateway->id?>">
|
18 |
+
<td class="sort">
|
19 |
+
<div class="wc-item-reorder-nav">
|
20 |
+
<button type="button" class="wc-move-up" tabindex="0" aria-hidden="false" aria-label="<?php /* Translators: %s Payment gateway name. */ echo esc_attr( sprintf( __( 'Move the "%s" payment method up', 'woocommerce' ), $gateway->get_method_title() ) ); ?>"><?php esc_html_e( 'Move up', 'woocommerce' ); ?></button>
|
21 |
+
<button type="button" class="wc-move-down" tabindex="0" aria-hidden="false" aria-label="<?php /* Translators: %s Payment gateway name. */ echo esc_attr( sprintf( __( 'Move the "%s" payment method down', 'woocommerce' ), $gateway->get_method_title() ) ); ?>"><?php esc_html_e( 'Move down', 'woocommerce' ); ?></button>
|
22 |
+
<input type="hidden" name="stripe_gateway_order[]" value="<?php echo esc_attr( $gateway->id ); ?>" />
|
23 |
+
</div>
|
24 |
+
</td>
|
25 |
+
<td>
|
26 |
+
<?php echo $gateway->get_method_title()?>
|
27 |
+
</td>
|
28 |
+
<td>
|
29 |
+
<a class="wc-stripe-product-gateway-enabled" href="#">
|
30 |
+
<span class="woocommerce-input-toggle woocommerce-input-toggle--<?php if(!self::get_product_option($gateway->id)->enabled()){?>disabled<?php }else{?>enabled<?php }?>"></span>
|
31 |
+
</a>
|
32 |
+
</td>
|
33 |
+
<td>
|
34 |
+
<select name="stripe_capture_type[]" class="wc-enhanced-select" style="width: 100px">
|
35 |
+
<option value="capture" <?php selected('capture', self::get_product_option($gateway->id)->get_option('charge_type'))?>><?php _e('Capture', 'woo-stripe-payment')?></option>
|
36 |
+
<option value="authorize" <?php selected('authorize', self::get_product_option($gateway->id)->get_option('charge_type'))?>><?php _e('Authorize', 'woo-stripe-payment')?></option>
|
37 |
+
</select>
|
38 |
+
</td>
|
39 |
+
</tr>
|
40 |
+
<?php endforeach;?>
|
41 |
+
</tbody>
|
42 |
+
</table>
|
43 |
+
<?php
|
44 |
+
woocommerce_wp_select ( [
|
45 |
+
'id' => '_stripe_button_position',
|
46 |
+
'value' => (($position = $product_object->get_meta ( '_stripe_button_position' )) ? $position : 'bottom'),
|
47 |
+
'label' => __ ( 'Button Position', 'woo-stripe-payment' ),
|
48 |
+
'options' => [
|
49 |
+
'bottom' => __ ( 'Below add to cart', 'woo-stripe-payment' ),
|
50 |
+
'top' => __ ( 'Above add to cart', 'woo-stripe-payment' )
|
51 |
+
],
|
52 |
+
'desc_tip' => true,
|
53 |
+
'description' => __('The location of the payment buttons in relation to the Add to Cart button.', 'wo-stripe-payment')
|
54 |
+
] );
|
55 |
+
?>
|
56 |
+
</div>
|
57 |
+
<p>
|
58 |
+
<button class="button button-secondary wc-stripe-save-product-data"><?php _e('Save', 'woo-stripe-payment')?></button>
|
59 |
+
<span class="spinner"></span>
|
60 |
+
</p>
|
61 |
+
</div>
|
includes/class-stripe.php
CHANGED
@@ -3,7 +3,7 @@ defined ( 'ABSPATH' ) || exit ();
|
|
3 |
|
4 |
/**
|
5 |
* Singleton class that handles plugin functionality like class loading.
|
6 |
-
*
|
7 |
* @since 3.0.0
|
8 |
* @author PaymentPlugins
|
9 |
* @package Stripe/Classes
|
@@ -24,7 +24,7 @@ class WC_Stripe_Manager {
|
|
24 |
*
|
25 |
* @var string
|
26 |
*/
|
27 |
-
public $version = '3.1.
|
28 |
|
29 |
/**
|
30 |
*
|
@@ -76,7 +76,6 @@ class WC_Stripe_Manager {
|
|
76 |
'woocommerce_dependencies'
|
77 |
) );
|
78 |
$this->includes ();
|
79 |
-
// $this->version = rand(0, 12000);
|
80 |
}
|
81 |
|
82 |
/**
|
@@ -129,8 +128,7 @@ class WC_Stripe_Manager {
|
|
129 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/class-wc-stripe-admin-assets.php';
|
130 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/class-wc-stripe-admin-settings.php';
|
131 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/meta-boxes/class-wc-stripe-admin-order-metaboxes.php';
|
132 |
-
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/class-wc-stripe-admin-
|
133 |
-
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/class-wc-stripe-admin-notices.php';
|
134 |
}
|
135 |
}
|
136 |
|
@@ -194,11 +192,17 @@ class WC_Stripe_Manager {
|
|
194 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/class-wc-stripe-gateway-conversions.php';
|
195 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/class-wc-stripe-frontend-notices.php';
|
196 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/class-wc-stripe-redirect-handler.php';
|
|
|
197 |
|
198 |
// settings
|
199 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-stripe-settings.php';
|
200 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/settings/class-wc-stripe-api-settings.php';
|
201 |
|
|
|
|
|
|
|
|
|
|
|
202 |
$this->payment_gateways = apply_filters ( 'wc_stripe_payment_gateways', array(
|
203 |
'WC_Payment_Gateway_Stripe_CC',
|
204 |
'WC_Payment_Gateway_Stripe_ApplePay',
|
3 |
|
4 |
/**
|
5 |
* Singleton class that handles plugin functionality like class loading.
|
6 |
+
*
|
7 |
* @since 3.0.0
|
8 |
* @author PaymentPlugins
|
9 |
* @package Stripe/Classes
|
24 |
*
|
25 |
* @var string
|
26 |
*/
|
27 |
+
public $version = '3.1.2';
|
28 |
|
29 |
/**
|
30 |
*
|
76 |
'woocommerce_dependencies'
|
77 |
) );
|
78 |
$this->includes ();
|
|
|
79 |
}
|
80 |
|
81 |
/**
|
128 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/class-wc-stripe-admin-assets.php';
|
129 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/class-wc-stripe-admin-settings.php';
|
130 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/meta-boxes/class-wc-stripe-admin-order-metaboxes.php';
|
131 |
+
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/meta-boxes/class-wc-stripe-admin-meta-box-product-data.php';
|
|
|
132 |
}
|
133 |
}
|
134 |
|
192 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/class-wc-stripe-gateway-conversions.php';
|
193 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/class-wc-stripe-frontend-notices.php';
|
194 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/class-wc-stripe-redirect-handler.php';
|
195 |
+
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/class-wc-stripe-product-gateway-option.php';
|
196 |
|
197 |
// settings
|
198 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/abstract/abstract-wc-stripe-settings.php';
|
199 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/settings/class-wc-stripe-api-settings.php';
|
200 |
|
201 |
+
if (is_admin ()) {
|
202 |
+
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/class-wc-stripe-admin-notices.php';
|
203 |
+
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/admin/class-wc-stripe-admin-user-edit.php';
|
204 |
+
}
|
205 |
+
|
206 |
$this->payment_gateways = apply_filters ( 'wc_stripe_payment_gateways', array(
|
207 |
'WC_Payment_Gateway_Stripe_CC',
|
208 |
'WC_Payment_Gateway_Stripe_ApplePay',
|
includes/class-wc-stripe-constants.php
CHANGED
@@ -30,4 +30,10 @@ class WC_Stripe_Constants {
|
|
30 |
const SUCCESS = 'success';
|
31 |
|
32 |
const FAILURE = 'failure';
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
30 |
const SUCCESS = 'success';
|
31 |
|
32 |
const FAILURE = 'failure';
|
33 |
+
|
34 |
+
const WOOCOMMERCE_STRIPE_ORDER_PAY = 'WOOCOMMERCE_STRIPE_ORDER_PAY';
|
35 |
+
|
36 |
+
const PRODUCT_GATEWAY_ORDER = '_stripe_gateway_order';
|
37 |
+
|
38 |
+
const BUTTON_POSITION = '_stripe_button_position';
|
39 |
}
|
includes/class-wc-stripe-field-manager.php
CHANGED
@@ -12,12 +12,14 @@ class WC_Stripe_Field_Manager {
|
|
12 |
|
13 |
private static $_cart_priority = 30;
|
14 |
|
|
|
|
|
15 |
public static function init() {
|
16 |
add_action ( 'woocommerce_checkout_before_customer_details', array(
|
17 |
__CLASS__, 'output_banner_checkout_fields'
|
18 |
) );
|
19 |
-
add_action ( '
|
20 |
-
__CLASS__, '
|
21 |
) );
|
22 |
add_action ( 'init', [ __CLASS__,
|
23 |
'init_action'
|
@@ -63,9 +65,6 @@ class WC_Stripe_Field_Manager {
|
|
63 |
}
|
64 |
|
65 |
public static function output_checkout_fields() {
|
66 |
-
// now that sources have been printed, clear them.
|
67 |
-
WC ()->session->set ( 'wc_stripe_local_payment_sources', [] );
|
68 |
-
|
69 |
self::output_required_fields ();
|
70 |
|
71 |
wp_localize_script ( 'wc-checkout', 'wc_stripe_checkout_fields', [
|
@@ -76,23 +75,51 @@ class WC_Stripe_Field_Manager {
|
|
76 |
do_action ( 'wc_stripe_output_checkout_fields' );
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
public static function output_product_checkout_fields() {
|
80 |
global $product;
|
81 |
$gateways = [];
|
|
|
|
|
|
|
82 |
foreach ( WC ()->payment_gateways ()->get_available_payment_gateways () as $id => $gateway ) {
|
83 |
/**
|
84 |
*
|
85 |
* @var WC_Payment_Gateway_Stripe $gateway
|
86 |
*/
|
87 |
-
if ($gateway->supports ( 'wc_stripe_product_checkout' )
|
88 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
}
|
|
|
91 |
|
92 |
if (count ( $gateways ) > 0) {
|
93 |
|
94 |
self::output_required_fields ();
|
95 |
-
printf ( '<input type="hidden" id="product_id", value="%s"/>', $product->get_id () );
|
96 |
printf ( '<input type="hidden" id="wc_stripe_product_data" data-product="%s"/>', htmlspecialchars ( wp_json_encode ( [
|
97 |
'product_id' => $product->get_id (),
|
98 |
'price' => $product->get_price (),
|
@@ -114,6 +141,7 @@ class WC_Stripe_Field_Manager {
|
|
114 |
self::output_fields ( 'shipping' );
|
115 |
|
116 |
wc_stripe_get_template ( 'product/payment-methods.php', [
|
|
|
117 |
'gateways' => $gateways
|
118 |
] );
|
119 |
}
|
12 |
|
13 |
private static $_cart_priority = 30;
|
14 |
|
15 |
+
private static $_product_button_position;
|
16 |
+
|
17 |
public static function init() {
|
18 |
add_action ( 'woocommerce_checkout_before_customer_details', array(
|
19 |
__CLASS__, 'output_banner_checkout_fields'
|
20 |
) );
|
21 |
+
add_action ( 'woocommerce_before_add_to_cart_form', array(
|
22 |
+
__CLASS__, 'before_add_to_cart'
|
23 |
) );
|
24 |
add_action ( 'init', [ __CLASS__,
|
25 |
'init_action'
|
65 |
}
|
66 |
|
67 |
public static function output_checkout_fields() {
|
|
|
|
|
|
|
68 |
self::output_required_fields ();
|
69 |
|
70 |
wp_localize_script ( 'wc-checkout', 'wc_stripe_checkout_fields', [
|
75 |
do_action ( 'wc_stripe_output_checkout_fields' );
|
76 |
}
|
77 |
|
78 |
+
public static function before_add_to_cart() {
|
79 |
+
global $product;
|
80 |
+
self::$_product_button_position = $product->get_meta ( WC_Stripe_Constants::BUTTON_POSITION );
|
81 |
+
if (empty ( self::$_product_button_position )) {
|
82 |
+
self::$_product_button_position = 'bottom';
|
83 |
+
}
|
84 |
+
|
85 |
+
if ('bottom' == self::$_product_button_position) {
|
86 |
+
$action = 'woocommerce_after_add_to_cart_button';
|
87 |
+
} else {
|
88 |
+
$action = 'woocommerce_before_add_to_cart_button';
|
89 |
+
}
|
90 |
+
add_action ( $action, array( __CLASS__,
|
91 |
+
'output_product_checkout_fields'
|
92 |
+
) );
|
93 |
+
}
|
94 |
+
|
95 |
public static function output_product_checkout_fields() {
|
96 |
global $product;
|
97 |
$gateways = [];
|
98 |
+
$ordering = $product->get_meta ( WC_Stripe_Constants::PRODUCT_GATEWAY_ORDER );
|
99 |
+
$ordering = ! $ordering ? [] : $ordering;
|
100 |
+
|
101 |
foreach ( WC ()->payment_gateways ()->get_available_payment_gateways () as $id => $gateway ) {
|
102 |
/**
|
103 |
*
|
104 |
* @var WC_Payment_Gateway_Stripe $gateway
|
105 |
*/
|
106 |
+
if ($gateway->supports ( 'wc_stripe_product_checkout' )) {
|
107 |
+
$option = new WC_Stripe_Product_Gateway_Option ( $product, $gateway );
|
108 |
+
if ($option->enabled ()) {
|
109 |
+
if (isset ( $ordering[ $gateway->id ] )) {
|
110 |
+
$gateways[ $ordering[ $gateway->id ] ] = $gateway;
|
111 |
+
} else {
|
112 |
+
$gateways[] = $gateway;
|
113 |
+
}
|
114 |
+
}
|
115 |
}
|
116 |
}
|
117 |
+
ksort ( $gateways );
|
118 |
|
119 |
if (count ( $gateways ) > 0) {
|
120 |
|
121 |
self::output_required_fields ();
|
122 |
+
printf ( '<input type="hidden" id="product_id" name="product_id", value="%s"/>', $product->get_id () );
|
123 |
printf ( '<input type="hidden" id="wc_stripe_product_data" data-product="%s"/>', htmlspecialchars ( wp_json_encode ( [
|
124 |
'product_id' => $product->get_id (),
|
125 |
'price' => $product->get_price (),
|
141 |
self::output_fields ( 'shipping' );
|
142 |
|
143 |
wc_stripe_get_template ( 'product/payment-methods.php', [
|
144 |
+
'position' => self::$_product_button_position,
|
145 |
'gateways' => $gateways
|
146 |
] );
|
147 |
}
|
includes/class-wc-stripe-frontend-scripts.php
CHANGED
@@ -31,6 +31,9 @@ class WC_Stripe_Frontend_Scripts {
|
|
31 |
add_action ( 'woocommerce_review_order_before_payment', array(
|
32 |
$this, 'enqueue_checkout_scripts'
|
33 |
) );
|
|
|
|
|
|
|
34 |
}
|
35 |
|
36 |
/**
|
@@ -66,7 +69,7 @@ class WC_Stripe_Frontend_Scripts {
|
|
66 |
public function enqueue_checkout_scripts() {
|
67 |
$data = wc_stripe_get_local_payment_params ();
|
68 |
// only enqueue local payment script if there are local payment gateways that have been enabled.
|
69 |
-
if (! empty ( $data[ 'gateways' ] )) {
|
70 |
$this->enqueue_script ( 'local-payment', $this->assets_url ( 'js/frontend/local-payment.js' ), [
|
71 |
$this->get_handle ( 'external' ),
|
72 |
$this->get_handle ( 'wc-stripe' )
|
31 |
add_action ( 'woocommerce_review_order_before_payment', array(
|
32 |
$this, 'enqueue_checkout_scripts'
|
33 |
) );
|
34 |
+
add_action ( 'woocommerce_pay_order_after_submit', array(
|
35 |
+
$this, 'enqueue_checkout_scripts'
|
36 |
+
) );
|
37 |
}
|
38 |
|
39 |
/**
|
69 |
public function enqueue_checkout_scripts() {
|
70 |
$data = wc_stripe_get_local_payment_params ();
|
71 |
// only enqueue local payment script if there are local payment gateways that have been enabled.
|
72 |
+
if (! empty ( $data[ 'gateways' ] ) && ! in_array ( $this->get_handle ( 'local-payment' ), $this->enqueued_scripts )) {
|
73 |
$this->enqueue_script ( 'local-payment', $this->assets_url ( 'js/frontend/local-payment.js' ), [
|
74 |
$this->get_handle ( 'external' ),
|
75 |
$this->get_handle ( 'wc-stripe' )
|
includes/class-wc-stripe-gateway.php
CHANGED
@@ -44,7 +44,7 @@ class WC_Stripe_Gateway {
|
|
44 |
|
45 |
public static function init() {
|
46 |
\Stripe\Stripe::setAppInfo ( 'Wordpress woo-stripe-payment', wc_stripe ()->version (), 'https://wordpress.org/plugins/woo-stripe-payment/', 'pp_partner_FdPtriN2Q7JLOe' );
|
47 |
-
\Stripe\Stripe::setApiVersion ( '
|
48 |
}
|
49 |
|
50 |
/**
|
44 |
|
45 |
public static function init() {
|
46 |
\Stripe\Stripe::setAppInfo ( 'Wordpress woo-stripe-payment', wc_stripe ()->version (), 'https://wordpress.org/plugins/woo-stripe-payment/', 'pp_partner_FdPtriN2Q7JLOe' );
|
47 |
+
\Stripe\Stripe::setApiVersion ( '2020-03-02' );
|
48 |
}
|
49 |
|
50 |
/**
|
includes/class-wc-stripe-payment-charge.php
CHANGED
@@ -124,7 +124,9 @@ class WC_Stripe_Payment_Charge extends WC_Stripe_Payment {
|
|
124 |
public function get_order_charge_args(&$args, $order) {
|
125 |
$this->add_general_order_args ( $args, $order );
|
126 |
|
127 |
-
|
|
|
|
|
128 |
$args[ 'capture' ] = $this->payment_method->get_option ( 'charge_type' ) === 'capture';
|
129 |
|
130 |
$customer_id = wc_stripe_get_customer_id ( $order->get_user_id () );
|
124 |
public function get_order_charge_args(&$args, $order) {
|
125 |
$this->add_general_order_args ( $args, $order );
|
126 |
|
127 |
+
if (get_option ( 'woocommerce_stripe_email_receipt', 'no' ) === 'yes' && ( $email = $order->get_billing_email () )) {
|
128 |
+
$args[ 'receipt_email' ] = $email;
|
129 |
+
}
|
130 |
$args[ 'capture' ] = $this->payment_method->get_option ( 'charge_type' ) === 'capture';
|
131 |
|
132 |
$customer_id = wc_stripe_get_customer_id ( $order->get_user_id () );
|
includes/class-wc-stripe-payment-intent.php
CHANGED
@@ -71,14 +71,12 @@ class WC_Stripe_Payment_Intent extends WC_Stripe_Payment {
|
|
71 |
}
|
72 |
}
|
73 |
if ($intent->status === 'requires_source_action' || $intent->status === 'requires_action') {
|
74 |
-
// 3DS actions are required. Need to have customer complete action.
|
75 |
return ( object ) [
|
76 |
'complete_payment' => false,
|
77 |
'redirect' => $this->payment_method->get_payment_intent_checkout_url ( $intent, $order )
|
78 |
];
|
79 |
}
|
80 |
if ($intent->status === 'requires_source' || $intent->status === 'requires_payment_method') {
|
81 |
-
// return new WP_Error ( 'payment-intent-error', __ ( 'A new payment method is required.', 'woo-stripe-payment' ) );
|
82 |
return ( object ) [
|
83 |
'complete_payment' => false,
|
84 |
'redirect' => $this->payment_method->get_payment_intent_checkout_url ( $intent, $order )
|
@@ -200,7 +198,7 @@ class WC_Stripe_Payment_Intent extends WC_Stripe_Payment {
|
|
200 |
$args[ 'confirm' ] = false;
|
201 |
}
|
202 |
|
203 |
-
if (( $email = $order->get_billing_email () )) {
|
204 |
$args[ 'receipt_email' ] = $email;
|
205 |
}
|
206 |
|
71 |
}
|
72 |
}
|
73 |
if ($intent->status === 'requires_source_action' || $intent->status === 'requires_action') {
|
|
|
74 |
return ( object ) [
|
75 |
'complete_payment' => false,
|
76 |
'redirect' => $this->payment_method->get_payment_intent_checkout_url ( $intent, $order )
|
77 |
];
|
78 |
}
|
79 |
if ($intent->status === 'requires_source' || $intent->status === 'requires_payment_method') {
|
|
|
80 |
return ( object ) [
|
81 |
'complete_payment' => false,
|
82 |
'redirect' => $this->payment_method->get_payment_intent_checkout_url ( $intent, $order )
|
198 |
$args[ 'confirm' ] = false;
|
199 |
}
|
200 |
|
201 |
+
if (get_option ( 'woocommerce_stripe_email_receipt', 'no' ) === 'yes' && ( $email = $order->get_billing_email () )) {
|
202 |
$args[ 'receipt_email' ] = $email;
|
203 |
}
|
204 |
|
includes/class-wc-stripe-product-gateway-option.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @since 3.1.2
|
4 |
+
* @package Stripe/Classes
|
5 |
+
* @author PaymentPlugins
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
class WC_Stripe_Product_Gateway_Option {
|
9 |
+
|
10 |
+
/**
|
11 |
+
*
|
12 |
+
* @var string
|
13 |
+
*/
|
14 |
+
private $id;
|
15 |
+
|
16 |
+
/**
|
17 |
+
*
|
18 |
+
* @var array
|
19 |
+
*/
|
20 |
+
private $settings = [];
|
21 |
+
|
22 |
+
/**
|
23 |
+
*
|
24 |
+
* @var WC_Product
|
25 |
+
*/
|
26 |
+
private $product;
|
27 |
+
|
28 |
+
/**
|
29 |
+
*
|
30 |
+
* @var WC_Payment_Gateway_Stripe
|
31 |
+
*/
|
32 |
+
private $payment_method;
|
33 |
+
|
34 |
+
/**
|
35 |
+
*
|
36 |
+
* @param int|WC_Product $product
|
37 |
+
* @param WC_Payment_Gateway_Stripe $payment_method
|
38 |
+
*/
|
39 |
+
public function __construct($product, $payment_method) {
|
40 |
+
if (! is_object ( $product )) {
|
41 |
+
$this->product = wc_get_product ( $product );
|
42 |
+
} else {
|
43 |
+
$this->product = $product;
|
44 |
+
}
|
45 |
+
$this->payment_method = $payment_method;
|
46 |
+
|
47 |
+
$this->init_settings ();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Return the ID of this product option.
|
52 |
+
*/
|
53 |
+
public function get_id() {
|
54 |
+
return '_' . $this->payment_method->id . '_options';
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Save the settings
|
59 |
+
*/
|
60 |
+
public function save() {
|
61 |
+
$this->product->update_meta_data ( $this->get_id (), $this->settings );
|
62 |
+
$this->product->save ();
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Initialzie the settings.
|
67 |
+
*/
|
68 |
+
public function init_settings() {
|
69 |
+
if (! $this->settings) {
|
70 |
+
$this->settings = $this->product->get_meta ( $this->get_id () );
|
71 |
+
$this->settings = is_array ( $this->settings ) ? $this->settings : [];
|
72 |
+
$this->settings = wp_parse_args ( $this->settings, $this->get_default_values () );
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
public function get_default_values() {
|
77 |
+
return [
|
78 |
+
'enabled' => $this->payment_method->product_checkout_enabled (),
|
79 |
+
'charge_type' => $this->payment_method->get_option ( 'charge_type' )
|
80 |
+
];
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
*
|
85 |
+
* @param string $key
|
86 |
+
* @param mixed $default
|
87 |
+
*/
|
88 |
+
public function get_option($key, $default = null) {
|
89 |
+
if (! isset ( $this->settings[ $key ] ) && null != $default) {
|
90 |
+
$this->settings[ $key ] = $default;
|
91 |
+
}
|
92 |
+
return $this->settings[ $key ];
|
93 |
+
}
|
94 |
+
|
95 |
+
public function set_option($key, $value) {
|
96 |
+
$this->settings[ $key ] = $value;
|
97 |
+
}
|
98 |
+
|
99 |
+
public function enabled() {
|
100 |
+
return $this->get_option ( 'enabled', false );
|
101 |
+
}
|
102 |
+
}
|
includes/class-wc-stripe-product-option.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @since 3.1.2
|
4 |
+
* @package Stripe/Classes
|
5 |
+
* @author PaymentPlugins
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
class WC_Stripe_Product_Option {
|
9 |
+
|
10 |
+
/**
|
11 |
+
*
|
12 |
+
* @var string
|
13 |
+
*/
|
14 |
+
private $id;
|
15 |
+
|
16 |
+
/**
|
17 |
+
*
|
18 |
+
* @var array
|
19 |
+
*/
|
20 |
+
private $settings = [];
|
21 |
+
|
22 |
+
/**
|
23 |
+
*
|
24 |
+
* @var WC_Product
|
25 |
+
*/
|
26 |
+
private $product;
|
27 |
+
|
28 |
+
/**
|
29 |
+
*
|
30 |
+
* @var WC_Payment_Gateway_Stripe
|
31 |
+
*/
|
32 |
+
private $payment_method;
|
33 |
+
|
34 |
+
/**
|
35 |
+
*
|
36 |
+
* @param int|WC_Product $product
|
37 |
+
* @param WC_Payment_Gateway_Stripe $payment_method
|
38 |
+
*/
|
39 |
+
public function __construct($product, $payment_method) {
|
40 |
+
if (! is_object ( $product )) {
|
41 |
+
$this->product = wc_get_product ( $product );
|
42 |
+
} else {
|
43 |
+
$this->product = $product;
|
44 |
+
}
|
45 |
+
$this->payment_method = $payment_method;
|
46 |
+
|
47 |
+
$this->init_settings ();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Return the ID of this product option.
|
52 |
+
*/
|
53 |
+
public function get_id() {
|
54 |
+
return '_' . $this->payment_method->id . '_options';
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Save the settings
|
59 |
+
*/
|
60 |
+
public function save() {
|
61 |
+
$this->product->update_meta_data ( $this->get_id (), $this->settings );
|
62 |
+
$this->product->save ();
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Initialzie the settings.
|
67 |
+
*/
|
68 |
+
public function init_settings() {
|
69 |
+
if (! $this->settings) {
|
70 |
+
$this->settings = $this->product->get_meta ( $this->get_id () );
|
71 |
+
$this->settings = is_array ( $this->settings ) ? $this->settings : [];
|
72 |
+
$this->settings = wp_parse_args ( $this->settings, $this->get_default_values () );
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
public function get_default_values() {
|
77 |
+
return [
|
78 |
+
'enabled' => $this->payment_method->product_checkout_enabled (),
|
79 |
+
'charge_type' => $this->payment_method->get_option ( 'charge_type' )
|
80 |
+
];
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
*
|
85 |
+
* @param string $key
|
86 |
+
* @param mixed $default
|
87 |
+
*/
|
88 |
+
public function get_option($key, $default = null) {
|
89 |
+
if (! isset ( $this->settings[ $key ] ) && null != $default) {
|
90 |
+
$this->settings[ $key ] = $default;
|
91 |
+
}
|
92 |
+
return $this->settings[ $key ];
|
93 |
+
}
|
94 |
+
|
95 |
+
public function set_option($key, $value) {
|
96 |
+
$this->settings[ $key ] = $value;
|
97 |
+
}
|
98 |
+
|
99 |
+
public function enabled() {
|
100 |
+
return $this->get_option ( 'enabled', false );
|
101 |
+
}
|
102 |
+
}
|
includes/class-wc-stripe-rest-api.php
CHANGED
@@ -12,6 +12,7 @@ defined ( 'ABSPATH' ) || exit ();
|
|
12 |
* @property WC_Stripe_Rest_Controller $googlepay
|
13 |
* @property WC_Stripe_Rest_Controller $settings
|
14 |
* @property WC_Stripe_Rest_Controller $webhook
|
|
|
15 |
*/
|
16 |
class WC_Stripe_Rest_API {
|
17 |
|
@@ -60,6 +61,7 @@ class WC_Stripe_Rest_API {
|
|
60 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/controllers/class-wc-stripe-controller-payment-method.php';
|
61 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/controllers/class-wc-stripe-controller-gateway-settings.php';
|
62 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/controllers/class-wc-stripe-controller-webhook.php';
|
|
|
63 |
|
64 |
foreach ( $this->get_controllers () as $key => $class_name ) {
|
65 |
if (class_exists ( $class_name )) {
|
@@ -88,7 +90,8 @@ class WC_Stripe_Rest_API {
|
|
88 |
'googlepay' => 'WC_Stripe_Controller_GooglePay',
|
89 |
'payment_method' => 'WC_Stripe_Controller_Payment_Method',
|
90 |
'settings' => 'WC_Stripe_Controller_Gateway_Settings',
|
91 |
-
'webhook' => 'WC_Stripe_Controller_Webhook'
|
|
|
92 |
);
|
93 |
return apply_filters ( 'wc_stripe_api_controllers', $controllers );
|
94 |
}
|
12 |
* @property WC_Stripe_Rest_Controller $googlepay
|
13 |
* @property WC_Stripe_Rest_Controller $settings
|
14 |
* @property WC_Stripe_Rest_Controller $webhook
|
15 |
+
* @property WC_Stripe_Rest_Controller $product_data
|
16 |
*/
|
17 |
class WC_Stripe_Rest_API {
|
18 |
|
61 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/controllers/class-wc-stripe-controller-payment-method.php';
|
62 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/controllers/class-wc-stripe-controller-gateway-settings.php';
|
63 |
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/controllers/class-wc-stripe-controller-webhook.php';
|
64 |
+
include_once WC_STRIPE_PLUGIN_FILE_PATH . 'includes/controllers/class-wc-stripe-controller-product-data.php';
|
65 |
|
66 |
foreach ( $this->get_controllers () as $key => $class_name ) {
|
67 |
if (class_exists ( $class_name )) {
|
90 |
'googlepay' => 'WC_Stripe_Controller_GooglePay',
|
91 |
'payment_method' => 'WC_Stripe_Controller_Payment_Method',
|
92 |
'settings' => 'WC_Stripe_Controller_Gateway_Settings',
|
93 |
+
'webhook' => 'WC_Stripe_Controller_Webhook',
|
94 |
+
'product_data' => 'WC_Stripe_Controller_Product_Data'
|
95 |
);
|
96 |
return apply_filters ( 'wc_stripe_api_controllers', $controllers );
|
97 |
}
|
includes/controllers/class-wc-stripe-controller-checkout.php
CHANGED
@@ -30,6 +30,12 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
30 |
'process_checkout'
|
31 |
]
|
32 |
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
/**
|
@@ -68,6 +74,10 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
68 |
add_filter ( 'woocommerce_get_checkout_order_received_url', function ($url, $order) {
|
69 |
return add_query_arg ( 'wc_stripe_product_checkout', $order->get_payment_method (), $url );
|
70 |
}, 10, 2 );
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
$checkout->process_checkout ();
|
73 |
} catch ( Exception $e ) {
|
@@ -79,6 +89,21 @@ class WC_Stripe_Controller_Checkout extends WC_Stripe_Rest_Controller {
|
|
79 |
return $this->send_response ( true );
|
80 |
}
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
/**
|
83 |
*
|
84 |
* @param WP_REST_Request $request
|
30 |
'process_checkout'
|
31 |
]
|
32 |
] );
|
33 |
+
register_rest_route ( $this->rest_uri (), 'order-pay', [
|
34 |
+
'methods' => WP_REST_Server::CREATABLE,
|
35 |
+
'callback' => [ $this,
|
36 |
+
'process_order_pay'
|
37 |
+
]
|
38 |
+
] );
|
39 |
}
|
40 |
|
41 |
/**
|
74 |
add_filter ( 'woocommerce_get_checkout_order_received_url', function ($url, $order) {
|
75 |
return add_query_arg ( 'wc_stripe_product_checkout', $order->get_payment_method (), $url );
|
76 |
}, 10, 2 );
|
77 |
+
|
78 |
+
// $option = new WC_Stripe_Product_Gateway_Option ( wc_get_product ( $request->get_param ( 'product_id' ) ), $gateway );
|
79 |
+
$option = new WC_Stripe_Product_Gateway_Option ( current ( WC ()->cart->get_cart () )[ 'data' ], $gateway );
|
80 |
+
$gateway->update_option ( 'charge_type', $option->get_option ( 'charge_type' ) );
|
81 |
}
|
82 |
$checkout->process_checkout ();
|
83 |
} catch ( Exception $e ) {
|
89 |
return $this->send_response ( true );
|
90 |
}
|
91 |
|
92 |
+
/**
|
93 |
+
*
|
94 |
+
* @since 3.1.8
|
95 |
+
* @param WP_REST_Request $request
|
96 |
+
*/
|
97 |
+
public function process_order_pay($request) {
|
98 |
+
global $wp;
|
99 |
+
|
100 |
+
$wp->query_vars[ 'order-pay' ] = $request->get_param ( 'order_id' );
|
101 |
+
|
102 |
+
wc_maybe_define_constant ( WC_Stripe_Constants::WOOCOMMERCE_STRIPE_ORDER_PAY, true );
|
103 |
+
|
104 |
+
WC_Form_Handler::pay_action ();
|
105 |
+
}
|
106 |
+
|
107 |
/**
|
108 |
*
|
109 |
* @param WP_REST_Request $request
|
includes/controllers/class-wc-stripe-controller-product-data.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined ( 'ABSPATH' ) || exit ();
|
3 |
+
|
4 |
+
/**
|
5 |
+
*
|
6 |
+
* @since 3.1.2
|
7 |
+
* @author PaymentPlugins
|
8 |
+
* @package Stripe/Controllers
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
class WC_Stripe_Controller_Product_Data extends WC_Stripe_Rest_Controller {
|
12 |
+
|
13 |
+
protected $namespace = 'product/';
|
14 |
+
|
15 |
+
public function register_routes() {
|
16 |
+
register_rest_route ( $this->rest_uri (), 'gateway', [
|
17 |
+
'methods' => WP_REST_Server::CREATABLE,
|
18 |
+
'callback' => [ $this, 'toggle_gateway'
|
19 |
+
],
|
20 |
+
'permission_callback' => [ $this,
|
21 |
+
'admin_permission_check'
|
22 |
+
]
|
23 |
+
] );
|
24 |
+
register_rest_route ( $this->rest_uri (), 'save', [
|
25 |
+
'methods' => WP_REST_Server::CREATABLE,
|
26 |
+
'callback' => [ $this, 'save'
|
27 |
+
],
|
28 |
+
'permission_callback' => [ $this,
|
29 |
+
'admin_permission_check'
|
30 |
+
]
|
31 |
+
] );
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
*
|
36 |
+
* @param WP_REST_Request $request
|
37 |
+
*/
|
38 |
+
public function toggle_gateway($request) {
|
39 |
+
$product = wc_get_product ( $request->get_param ( 'product_id' ) );
|
40 |
+
$payment_method = WC ()->payment_gateways ()->payment_gateways ()[ $request->get_param ( 'gateway_id' ) ];
|
41 |
+
|
42 |
+
$option = new WC_Stripe_Product_Gateway_Option ( $product, $payment_method );
|
43 |
+
$option->set_option ( 'enabled', ! $option->enabled () );
|
44 |
+
$option->save ();
|
45 |
+
return rest_ensure_response ( [
|
46 |
+
'enabled' => $option->enabled ()
|
47 |
+
] );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
*
|
52 |
+
* @param WP_REST_Request $request
|
53 |
+
*/
|
54 |
+
public function save($request) {
|
55 |
+
$gateways = $request->get_param ( 'gateways' );
|
56 |
+
$charge_types = $request->get_param ( 'charge_types' );
|
57 |
+
$payment_gateways = WC ()->payment_gateways ()->payment_gateways ();
|
58 |
+
$product = wc_get_product ( $request->get_param ( 'product_id' ) );
|
59 |
+
$order = [];
|
60 |
+
$loop = 0;
|
61 |
+
foreach ( $gateways as $gateway ) {
|
62 |
+
$order[ $gateway ] = $loop;
|
63 |
+
$loop ++;
|
64 |
+
}
|
65 |
+
$product->update_meta_data ( WC_Stripe_Constants::PRODUCT_GATEWAY_ORDER, $order );
|
66 |
+
|
67 |
+
foreach ( $charge_types as $type ) {
|
68 |
+
$option = new WC_Stripe_Product_Gateway_Option ( $product, $payment_gateways[ $type[ 'gateway' ] ] );
|
69 |
+
$option->set_option ( 'charge_type', $type[ 'value' ] );
|
70 |
+
$option->save ();
|
71 |
+
}
|
72 |
+
$product->update_meta_data ( '_stripe_button_position', $request->get_param ( 'position' ) );
|
73 |
+
|
74 |
+
$product->save ();
|
75 |
+
return rest_ensure_response ( [
|
76 |
+
'order' => $order
|
77 |
+
] );
|
78 |
+
}
|
79 |
+
}
|
includes/gateways/class-wc-payment-gateway-stripe-cc.php
CHANGED
@@ -157,7 +157,7 @@ class WC_Payment_Gateway_Stripe_CC extends WC_Payment_Gateway_Stripe {
|
|
157 |
*/
|
158 |
public function add_stripe_order_args(&$args, $order) {
|
159 |
// if the merchant is forcing 3D secure for all intents then add the required args.
|
160 |
-
if ($this->is_active ( 'force_3d_secure' ) && ! doing_action ( 'woocommerce_scheduled_subscription_payment_' . $this->id )) {
|
161 |
$args[ 'payment_method_options' ][ 'card' ][ 'request_three_d_secure' ] = 'any';
|
162 |
}
|
163 |
}
|
157 |
*/
|
158 |
public function add_stripe_order_args(&$args, $order) {
|
159 |
// if the merchant is forcing 3D secure for all intents then add the required args.
|
160 |
+
if ($this->is_active ( 'force_3d_secure' ) && is_checkout () && ! doing_action ( 'woocommerce_scheduled_subscription_payment_' . $this->id )) {
|
161 |
$args[ 'payment_method_options' ][ 'card' ][ 'request_three_d_secure' ] = 'any';
|
162 |
}
|
163 |
}
|
includes/gateways/class-wc-payment-gateway-stripe-googlepay.php
CHANGED
@@ -152,6 +152,8 @@ class WC_Payment_Gateway_Stripe_GooglePay extends WC_Payment_Gateway_Stripe {
|
|
152 |
];
|
153 |
}
|
154 |
} else {
|
|
|
|
|
155 |
foreach ( WC ()->cart->get_cart () as $cart_item ) {
|
156 |
/**
|
157 |
*
|
@@ -159,17 +161,19 @@ class WC_Payment_Gateway_Stripe_GooglePay extends WC_Payment_Gateway_Stripe {
|
|
159 |
*/
|
160 |
$product = $cart_item[ 'data' ];
|
161 |
$qty = $cart_item[ 'quantity' ];
|
|
|
|
|
162 |
$items[] = [
|
163 |
'label' => $qty > 1 ? sprintf ( '%s X %s', $product->get_name (), $qty ) : $product->get_name (),
|
164 |
'type' => 'LINE_ITEM',
|
165 |
-
'price' => strval ( round ( $product
|
166 |
];
|
167 |
}
|
168 |
if (WC ()->cart->needs_shipping ()) {
|
169 |
$items[] = [
|
170 |
'label' => __ ( 'Shipping', 'woo-stripe-payment' ),
|
171 |
'type' => 'LINE_ITEM',
|
172 |
-
'price' => strval ( round ( WC ()->cart->shipping_total, wc_get_price_decimals () ) )
|
173 |
];
|
174 |
}
|
175 |
|
@@ -181,7 +185,7 @@ class WC_Payment_Gateway_Stripe_GooglePay extends WC_Payment_Gateway_Stripe {
|
|
181 |
*/
|
182 |
$items[] = [ 'label' => $fee_item->name,
|
183 |
'type' => 'LINE_ITEM',
|
184 |
-
'price' => strval ( $fee_item->total )
|
185 |
];
|
186 |
}
|
187 |
|
@@ -190,15 +194,15 @@ class WC_Payment_Gateway_Stripe_GooglePay extends WC_Payment_Gateway_Stripe {
|
|
190 |
$items[] = [
|
191 |
'label' => __ ( 'Discount', 'woo-stripe-payment' ),
|
192 |
'type' => 'LINE_ITEM',
|
193 |
-
'price' => strval ( - 1 * abs ( WC ()->cart->discount_cart ) )
|
194 |
];
|
195 |
}
|
196 |
|
197 |
-
if (wc_tax_enabled ()) {
|
198 |
$items[] = [
|
199 |
'label' => __ ( 'Tax', 'woo-stripe-payment' ),
|
200 |
'type' => 'TAX',
|
201 |
-
'price' => strval ( WC ()->cart->get_taxes_total () )
|
202 |
];
|
203 |
}
|
204 |
}
|
@@ -244,12 +248,27 @@ class WC_Payment_Gateway_Stripe_GooglePay extends WC_Payment_Gateway_Stripe {
|
|
244 |
*
|
245 |
*/
|
246 |
public function get_shipping_method_label($rate) {
|
247 |
-
|
|
|
|
|
248 |
$total = $rate->cost + $rate->get_shipping_tax ();
|
249 |
} else {
|
250 |
$total = $rate->cost;
|
251 |
}
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
}
|
254 |
|
255 |
public function add_to_cart_response($data) {
|
152 |
];
|
153 |
}
|
154 |
} else {
|
155 |
+
$incl_tax = wc_stripe_display_prices_including_tax ();
|
156 |
+
$decimals = ( ( $decimals = wc_get_price_decimals () ) < 2 ? $decimals : 2 );
|
157 |
foreach ( WC ()->cart->get_cart () as $cart_item ) {
|
158 |
/**
|
159 |
*
|
161 |
*/
|
162 |
$product = $cart_item[ 'data' ];
|
163 |
$qty = $cart_item[ 'quantity' ];
|
164 |
+
$args = [ 'qty' => $qty
|
165 |
+
];
|
166 |
$items[] = [
|
167 |
'label' => $qty > 1 ? sprintf ( '%s X %s', $product->get_name (), $qty ) : $product->get_name (),
|
168 |
'type' => 'LINE_ITEM',
|
169 |
+
'price' => strval ( round ( $incl_tax ? wc_get_price_including_tax ( $product, $args ) : wc_get_price_excluding_tax ( $product, $args ), $decimals ) )
|
170 |
];
|
171 |
}
|
172 |
if (WC ()->cart->needs_shipping ()) {
|
173 |
$items[] = [
|
174 |
'label' => __ ( 'Shipping', 'woo-stripe-payment' ),
|
175 |
'type' => 'LINE_ITEM',
|
176 |
+
'price' => strval ( round ( $incl_tax ? WC ()->cart->shipping_total + WC ()->cart->shipping_tax_total : WC ()->cart->shipping_total, wc_get_price_decimals () ) )
|
177 |
];
|
178 |
}
|
179 |
|
185 |
*/
|
186 |
$items[] = [ 'label' => $fee_item->name,
|
187 |
'type' => 'LINE_ITEM',
|
188 |
+
'price' => strval ( round ( $incl_tax ? $fee_item->total + $fee_item->tax : $fee_item->total ), $decimals )
|
189 |
];
|
190 |
}
|
191 |
|
194 |
$items[] = [
|
195 |
'label' => __ ( 'Discount', 'woo-stripe-payment' ),
|
196 |
'type' => 'LINE_ITEM',
|
197 |
+
'price' => strval ( round ( - 1 * abs ( $incl_tax ? WC ()->cart->discount_cart + WC ()->cart->discount_cart_tax : WC ()->cart->discount_cart ), $decimals ) )
|
198 |
];
|
199 |
}
|
200 |
|
201 |
+
if (! $incl_tax && wc_tax_enabled ()) {
|
202 |
$items[] = [
|
203 |
'label' => __ ( 'Tax', 'woo-stripe-payment' ),
|
204 |
'type' => 'TAX',
|
205 |
+
'price' => strval ( round ( WC ()->cart->get_taxes_total (), $decimals ) )
|
206 |
];
|
207 |
}
|
208 |
}
|
248 |
*
|
249 |
*/
|
250 |
public function get_shipping_method_label($rate) {
|
251 |
+
$incl_tax = wc_stripe_display_prices_including_tax ();
|
252 |
+
|
253 |
+
if ($incl_tax) {
|
254 |
$total = $rate->cost + $rate->get_shipping_tax ();
|
255 |
} else {
|
256 |
$total = $rate->cost;
|
257 |
}
|
258 |
+
$decimals = ( ( $decimals = wc_get_price_decimals () ) < 2 ? $decimals : 2 );
|
259 |
+
$total = number_format ( $total, $decimals );
|
260 |
+
$label = sprintf ( '%s: %s %s', $rate->get_label (), $total, get_woocommerce_currency () );
|
261 |
+
|
262 |
+
if ($incl_tax) {
|
263 |
+
if ($rate->get_shipping_tax () > 0 && ! wc_prices_include_tax ()) {
|
264 |
+
$label .= ' ' . WC ()->countries->inc_tax_or_vat ();
|
265 |
+
}
|
266 |
+
} else {
|
267 |
+
if ($rate->get_shipping_tax () > 0 && wc_prices_include_tax ()) {
|
268 |
+
$label .= ' ' . WC ()->countries->ex_tax_or_vat ();
|
269 |
+
}
|
270 |
+
}
|
271 |
+
return $label;
|
272 |
}
|
273 |
|
274 |
public function add_to_cart_response($data) {
|
includes/gateways/class-wc-payment-gateway-stripe-klarna.php
CHANGED
@@ -36,6 +36,9 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
36 |
add_action ( 'woocommerce_review_order_before_payment', array(
|
37 |
$this, 'enqueue_klarna'
|
38 |
) );
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
/**
|
@@ -59,8 +62,18 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
59 |
}
|
60 |
|
61 |
public function is_local_payment_available() {
|
62 |
-
$
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
if ($country) {
|
65 |
$params = $this->get_required_parameters ();
|
66 |
return isset ( $params[ $currency ] ) && array_search ( $country, $params[ $currency ] ) !== false;
|
@@ -78,7 +91,7 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
78 |
// this might be an update checkout request. If so, update the source if it exists
|
79 |
if (is_ajax () && ( $order_id = absint ( WC ()->session->get ( 'order_awaiting_payment' ) ) )) {
|
80 |
$order = wc_get_order ( $order_id );
|
81 |
-
$source_id = $order->get_meta (
|
82 |
$this->gateway->update_source ( $source_id, $this->get_update_source_args ( $order ) );
|
83 |
}
|
84 |
parent::payment_fields ();
|
@@ -86,7 +99,7 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
86 |
|
87 |
private function get_update_source_args($order) {
|
88 |
$args = $this->get_source_args ( $order );
|
89 |
-
unset ( $args[ 'type' ], $args[ 'currency' ], $args[ 'statement_descriptor' ], $args[ 'redirect' ], $args[ 'klarna' ][ 'product' ] );
|
90 |
return $args;
|
91 |
}
|
92 |
|
@@ -116,6 +129,10 @@ class WC_Payment_Gateway_Stripe_Klarna extends WC_Payment_Gateway_Stripe_Local_P
|
|
116 |
] );
|
117 |
$args[ 'source_order' ] = [];
|
118 |
|
|
|
|
|
|
|
|
|
119 |
if ($order->get_shipping_address_1 ()) {
|
120 |
$args[ 'klarna' ][ 'shipping_first_name' ] = $order->get_shipping_first_name ();
|
121 |
$args[ 'klarna' ][ 'shipping_last_name' ] = $order->get_shipping_last_name ();
|
36 |
add_action ( 'woocommerce_review_order_before_payment', array(
|
37 |
$this, 'enqueue_klarna'
|
38 |
) );
|
39 |
+
add_action ( 'woocommerce_pay_order_after_submit', array(
|
40 |
+
$this, 'enqueue_klarna'
|
41 |
+
) );
|
42 |
}
|
43 |
|
44 |
/**
|
62 |
}
|
63 |
|
64 |
public function is_local_payment_available() {
|
65 |
+
global $wp;
|
66 |
+
if (isset ( $wp->query_vars[ 'order-pay' ] )) {
|
67 |
+
$order = wc_get_order ( absint ( $wp->query_vars[ 'order-pay' ] ) );
|
68 |
+
$currency = $order->get_currency ();
|
69 |
+
$country = $order->get_billing_country ();
|
70 |
+
} else {
|
71 |
+
$currency = get_woocommerce_currency ();
|
72 |
+
$country = WC ()->customer ? WC ()->customer->get_billing_country () : null;
|
73 |
+
if (! $country) {
|
74 |
+
$country = WC ()->countries->get_base_country ();
|
75 |
+
}
|
76 |
+
}
|
77 |
if ($country) {
|
78 |
$params = $this->get_required_parameters ();
|
79 |
return isset ( $params[ $currency ] ) && array_search ( $country, $params[ $currency ] ) !== false;
|
91 |
// this might be an update checkout request. If so, update the source if it exists
|
92 |
if (is_ajax () && ( $order_id = absint ( WC ()->session->get ( 'order_awaiting_payment' ) ) )) {
|
93 |
$order = wc_get_order ( $order_id );
|
94 |
+
$source_id = $order->get_meta ( WC_Stripe_Constants::SOURCE_ID, true );
|
95 |
$this->gateway->update_source ( $source_id, $this->get_update_source_args ( $order ) );
|
96 |
}
|
97 |
parent::payment_fields ();
|
99 |
|
100 |
private function get_update_source_args($order) {
|
101 |
$args = $this->get_source_args ( $order );
|
102 |
+
unset ( $args[ 'type' ], $args[ 'currency' ], $args[ 'statement_descriptor' ], $args[ 'redirect' ], $args[ 'klarna' ][ 'product' ], $args[ 'klarna' ][ 'locale' ] );
|
103 |
return $args;
|
104 |
}
|
105 |
|
129 |
] );
|
130 |
$args[ 'source_order' ] = [];
|
131 |
|
132 |
+
if (( $locale = get_locale () )) {
|
133 |
+
$args[ 'klarna' ][ 'locale' ] = str_replace ( '_', '-', $locale );
|
134 |
+
}
|
135 |
+
|
136 |
if ($order->get_shipping_address_1 ()) {
|
137 |
$args[ 'klarna' ][ 'shipping_first_name' ] = $order->get_shipping_first_name ();
|
138 |
$args[ 'klarna' ][ 'shipping_last_name' ] = $order->get_shipping_last_name ();
|
includes/gateways/settings/applepay-settings.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
return array(
|
3 |
'desc' => array( 'type' => 'description',
|
4 |
-
'description' => sprintf ( '<div class="wc-stripe-register-domain"><button class="button button-secondary api-register-domain">%s</button></div><p>%s</p>', __ ( 'Register Domain', 'woo-stripe-payment' ), sprintf ( __ ( 'This plugin attemps to add the domain association file to your server automatically when you click the Register Domain button. If that fails due to file permssions, you must add the <strong>%s.well-known/apple-developer-merchantid-domain-association%s</strong> file to your domain and register your domain within the Stripe Dashboard.', 'woo-stripe-payment' ), '<a href="https://stripe.com/files/apple-pay/apple-developer-merchantid-domain-association">', '</a>' ) )
|
5 |
),
|
6 |
'enabled' => array(
|
7 |
'title' => __ ( 'Enabled', 'woo-stripe-payment' ),
|
@@ -53,7 +53,7 @@ return array(
|
|
53 |
'checkout_banner' => __ ( 'Top of Checkout', 'woo-stripe-payment' )
|
54 |
], 'default' => [ 'product', 'cart'
|
55 |
],
|
56 |
-
'description' =>
|
57 |
),
|
58 |
'order_status' => array( 'type' => 'select',
|
59 |
'title' => __ ( 'Order Status', 'woo-stripe-payment' ),
|
@@ -64,7 +64,7 @@ return array(
|
|
64 |
), wc_get_order_statuses () ),
|
65 |
'tool_tip' => true,
|
66 |
'description' => __ ( 'This is the status of the order once payment is complete. If <b>Default</b> is selected, then WooCommerce will set the order status automatically based on internal logic which states if a product is virtual and downloadable then status is set to complete. Products that require shipping are set to Processing. Default is the recommended setting as it allows standard WooCommerce code to process the order status.', 'woo-stripe-payment' )
|
67 |
-
),
|
68 |
'button_section' => [ 'type' => 'title',
|
69 |
'title' => __ ( 'Button Settings', 'woo-stripe-payment' )
|
70 |
],
|
1 |
<?php
|
2 |
return array(
|
3 |
'desc' => array( 'type' => 'description',
|
4 |
+
'description' => sprintf ( '<div class="wc-stripe-register-domain"><button class="button button-secondary api-register-domain">%s</button></div><p>%s</p>', __ ( 'Register Domain', 'woo-stripe-payment' ), sprintf ( __ ( 'This plugin attemps to add the domain association file to your server automatically when you click the Register Domain button. If that fails due to file permssions, you must add the <strong>%s.well-known/apple-developer-merchantid-domain-association%s</strong> file to your domain and register your domain within the Stripe Dashboard.', 'woo-stripe-payment' ), '<a href="https://stripe.com/files/apple-pay/apple-developer-merchantid-domain-association">', '</a>' ) ) . '<p>' . __ ( 'In order for Apple Pay to display, you must test with an iOS device and have a payment method saved in the Apple Wallet.', 'woo-stripe-payment' ) . '</p>'
|
5 |
),
|
6 |
'enabled' => array(
|
7 |
'title' => __ ( 'Enabled', 'woo-stripe-payment' ),
|
53 |
'checkout_banner' => __ ( 'Top of Checkout', 'woo-stripe-payment' )
|
54 |
], 'default' => [ 'product', 'cart'
|
55 |
],
|
56 |
+
'description' => $this->get_payment_section_description ()
|
57 |
),
|
58 |
'order_status' => array( 'type' => 'select',
|
59 |
'title' => __ ( 'Order Status', 'woo-stripe-payment' ),
|
64 |
), wc_get_order_statuses () ),
|
65 |
'tool_tip' => true,
|
66 |
'description' => __ ( 'This is the status of the order once payment is complete. If <b>Default</b> is selected, then WooCommerce will set the order status automatically based on internal logic which states if a product is virtual and downloadable then status is set to complete. Products that require shipping are set to Processing. Default is the recommended setting as it allows standard WooCommerce code to process the order status.', 'woo-stripe-payment' )
|
67 |
+
),
|
68 |
'button_section' => [ 'type' => 'title',
|
69 |
'title' => __ ( 'Button Settings', 'woo-stripe-payment' )
|
70 |
],
|
includes/gateways/settings/cc-settings.php
CHANGED
@@ -57,7 +57,7 @@ return array(
|
|
57 |
'value' => 'yes', 'default' => 'yes',
|
58 |
'title' => __ ( 'Allow Credit Card Save', 'woo-stripe-payment' ),
|
59 |
'desc_tip' => false,
|
60 |
-
'description' => __ ( 'If enabled, a checkbox will be available on the checkout page allowing your
|
61 |
),
|
62 |
'force_3d_secure' => array(
|
63 |
'title' => __ ( 'Force 3D Secure', 'woo-stripe-payment' ),
|
57 |
'value' => 'yes', 'default' => 'yes',
|
58 |
'title' => __ ( 'Allow Credit Card Save', 'woo-stripe-payment' ),
|
59 |
'desc_tip' => false,
|
60 |
+
'description' => __ ( 'If enabled, a checkbox will be available on the checkout page allowing your customers to save their credit card. The payment methods are stored securely in Stripe\'s vault and never touch your server. Note: if the cart contains a subscription, there will be no checkbox because the payment method will be saved automatically. There will also be no checkbox for guest checkout as a user must be logged in to save a payment method.', 'woo-stripe-payment' )
|
61 |
),
|
62 |
'force_3d_secure' => array(
|
63 |
'title' => __ ( 'Force 3D Secure', 'woo-stripe-payment' ),
|
includes/gateways/settings/googlepay-settings.php
CHANGED
@@ -67,7 +67,7 @@ return array(
|
|
67 |
'checkout_banner' => __ ( 'Top of Checkout', 'woo-stripe-payment' )
|
68 |
], 'default' => [ 'product', 'cart'
|
69 |
],
|
70 |
-
'description' =>
|
71 |
),
|
72 |
'order_status' => array( 'type' => 'select',
|
73 |
'title' => __ ( 'Order Status', 'woo-stripe-payment' ),
|
67 |
'checkout_banner' => __ ( 'Top of Checkout', 'woo-stripe-payment' )
|
68 |
], 'default' => [ 'product', 'cart'
|
69 |
],
|
70 |
+
'description' => $this->get_payment_section_description ()
|
71 |
),
|
72 |
'order_status' => array( 'type' => 'select',
|
73 |
'title' => __ ( 'Order Status', 'woo-stripe-payment' ),
|
includes/gateways/settings/payment-request-settings.php
CHANGED
@@ -54,7 +54,7 @@ return array(
|
|
54 |
'checkout_banner' => __ ( 'Top of Checkout', 'woo-stripe-payment' )
|
55 |
], 'default' => [ 'product', 'cart'
|
56 |
],
|
57 |
-
'description' =>
|
58 |
),
|
59 |
'order_status' => array( 'type' => 'select',
|
60 |
'title' => __ ( 'Order Status', 'woo-stripe-payment' ),
|
54 |
'checkout_banner' => __ ( 'Top of Checkout', 'woo-stripe-payment' )
|
55 |
], 'default' => [ 'product', 'cart'
|
56 |
],
|
57 |
+
'description' => $this->get_payment_section_description ()
|
58 |
),
|
59 |
'order_status' => array( 'type' => 'select',
|
60 |
'title' => __ ( 'Order Status', 'woo-stripe-payment' ),
|
includes/traits/wc-stripe-payment-traits.php
CHANGED
@@ -85,6 +85,7 @@ trait WC_Stripe_Local_Payment_Intent_Trait {
|
|
85 |
// rand is used to generate some random entropy so that window hash events are triggered.
|
86 |
return sprintf ( '#response=%s', base64_encode ( wp_json_encode ( [
|
87 |
'client_secret' => $intent->client_secret,
|
|
|
88 |
'return_url' => $this->get_local_payment_return_url ( $order ),
|
89 |
'time' => rand ( 0, 999999 )
|
90 |
] ) ) );
|
85 |
// rand is used to generate some random entropy so that window hash events are triggered.
|
86 |
return sprintf ( '#response=%s', base64_encode ( wp_json_encode ( [
|
87 |
'client_secret' => $intent->client_secret,
|
88 |
+
'gateway_id' => $this->id,
|
89 |
'return_url' => $this->get_local_payment_return_url ( $order ),
|
90 |
'time' => rand ( 0, 999999 )
|
91 |
] ) ) );
|
includes/wc-stripe-functions.php
CHANGED
@@ -339,6 +339,8 @@ function wc_stripe_get_display_items($encode = false, $order = null) {
|
|
339 |
$items = [];
|
340 |
if (! $order) {
|
341 |
$cart = WC ()->cart;
|
|
|
|
|
342 |
foreach ( $cart->get_cart () as $cart_item ) {
|
343 |
/**
|
344 |
*
|
@@ -349,14 +351,18 @@ function wc_stripe_get_display_items($encode = false, $order = null) {
|
|
349 |
$items[] = [
|
350 |
'label' => $qty > 1 ? sprintf ( '%s X %s', $product->get_name (), $qty ) : $product->get_name (),
|
351 |
'pending' => false,
|
352 |
-
'amount' => wc_stripe_add_number_precision ( $
|
|
|
|
|
|
|
|
|
353 |
];
|
354 |
}
|
355 |
if ($cart->needs_shipping ()) {
|
356 |
$items[] = [
|
357 |
'label' => __ ( 'Shipping', 'woo-stripe-payment' ),
|
358 |
'pending' => false,
|
359 |
-
'amount' => wc_stripe_add_number_precision ( $cart->shipping_total )
|
360 |
];
|
361 |
}
|
362 |
|
@@ -364,7 +370,7 @@ function wc_stripe_get_display_items($encode = false, $order = null) {
|
|
364 |
foreach ( $cart->get_fees () as $fee ) {
|
365 |
$items[] = [ 'label' => $fee->name,
|
366 |
'pending' => false,
|
367 |
-
'amount' => wc_stripe_add_number_precision ( $fee->total )
|
368 |
];
|
369 |
}
|
370 |
// coupons
|
@@ -372,11 +378,11 @@ function wc_stripe_get_display_items($encode = false, $order = null) {
|
|
372 |
$items[] = [
|
373 |
'label' => __ ( 'Discount', 'woo-stripe-payment' ),
|
374 |
'pending' => false,
|
375 |
-
'amount' => wc_stripe_add_number_precision ( - 1 * abs ( $cart->discount_cart ) )
|
376 |
];
|
377 |
}
|
378 |
|
379 |
-
if (wc_tax_enabled ()) {
|
380 |
$items[] = [
|
381 |
'label' => __ ( 'Tax', 'woo-stripe-payment' ),
|
382 |
'pending' => false,
|
@@ -449,6 +455,7 @@ function wc_stripe_get_display_items($encode = false, $order = null) {
|
|
449 |
*/
|
450 |
function wc_stripe_get_shipping_options($encode = false, $order = null) {
|
451 |
$methods = [];
|
|
|
452 |
if (! $order) {
|
453 |
$ids = [];
|
454 |
$chosen_shipping_methods = WC ()->session->get ( 'chosen_shipping_methods', [] );
|
@@ -459,12 +466,22 @@ function wc_stripe_get_shipping_options($encode = false, $order = null) {
|
|
459 |
*
|
460 |
* @var WC_Shipping_Rate $rate
|
461 |
*/
|
462 |
-
$
|
463 |
'id' => sprintf ( '%s:%s', $i, $rate->id ),
|
464 |
'label' => sprintf ( '%s', esc_attr ( $rate->get_label () ) ),
|
465 |
'detail' => '',
|
466 |
-
'amount' => wc_stripe_add_number_precision ( $rate->cost )
|
467 |
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
$ids[] = $rate->id;
|
469 |
}
|
470 |
// Stripe always shows the first shipping option as selected. Make sure the chosen method
|
@@ -487,6 +504,11 @@ function wc_stripe_get_shipping_options($encode = false, $order = null) {
|
|
487 |
];
|
488 |
}
|
489 |
}
|
|
|
|
|
|
|
|
|
|
|
490 |
$methods = apply_filters ( 'wc_stripe_get_shipping_options', $methods, $order );
|
491 |
return $encode ? htmlspecialchars ( wp_json_encode ( $methods ) ) : $methods;
|
492 |
}
|
@@ -584,11 +606,15 @@ function wc_stripe_available_payment_gateways($gateways) {
|
|
584 |
* @return array
|
585 |
*/
|
586 |
function wc_stripe_get_local_payment_params() {
|
|
|
587 |
$data = [];
|
588 |
$gateways = WC ()->payment_gateways ()->payment_gateways ();
|
589 |
foreach ( $gateways as $gateway ) {
|
590 |
if ($gateway instanceof WC_Payment_Gateway_Stripe_Local_Payment && $gateway->is_available ()) {
|
591 |
$data[ 'gateways' ][ $gateway->id ] = $gateway->get_localized_params ();
|
|
|
|
|
|
|
592 |
}
|
593 |
}
|
594 |
$data[ 'api_key' ] = wc_stripe_get_publishable_key ();
|
@@ -907,11 +933,8 @@ function wc_stripe_display_prices_including_tax() {
|
|
907 |
$cart = WC ()->cart;
|
908 |
if (method_exists ( $cart, 'display_prices_including_tax' )) {
|
909 |
return $cart->display_prices_including_tax ();
|
910 |
-
} else {
|
911 |
-
$customer = WC ()->customer;
|
912 |
-
$customer_exempt = $customer && $customer->get_is_vat_exempt ();
|
913 |
-
'incl' === $cart->tax_display_cart && ! $customer_exempt;
|
914 |
}
|
|
|
915 |
}
|
916 |
|
917 |
/**
|
@@ -1053,6 +1076,7 @@ function wc_stripe_credit_card_labels($labels) {
|
|
1053 |
function wc_stripe_get_error_messages() {
|
1054 |
return apply_filters ( 'wc_stripe_get_error_messages', [
|
1055 |
'stripe_cc_generic' => __ ( 'There was an error processing your credit card.', 'woo-stripe-payment' ),
|
|
|
1056 |
'incorrect_number' => __ ( 'The card number is incorrect. Check the card\'s number or use a different card.', 'woo-stripe-payment' ),
|
1057 |
'incorrect_cvc' => __ ( 'The card\'s security code is incorrect. Check the card\'s security code or use a different card.', 'woo-stripe-payment' ),
|
1058 |
'incorrect_zip' => __ ( 'The card\'s ZIP code is incorrect. Check the card\'s ZIP code or use a different card.', 'woo-stripe-payment' ),
|
339 |
$items = [];
|
340 |
if (! $order) {
|
341 |
$cart = WC ()->cart;
|
342 |
+
$incl_tax = wc_stripe_display_prices_including_tax ();
|
343 |
+
|
344 |
foreach ( $cart->get_cart () as $cart_item ) {
|
345 |
/**
|
346 |
*
|
351 |
$items[] = [
|
352 |
'label' => $qty > 1 ? sprintf ( '%s X %s', $product->get_name (), $qty ) : $product->get_name (),
|
353 |
'pending' => false,
|
354 |
+
'amount' => wc_stripe_add_number_precision ( $incl_tax ? wc_get_price_including_tax ( $product, [
|
355 |
+
'qty' => $qty
|
356 |
+
] ) : wc_get_price_excluding_tax ( $product, [
|
357 |
+
'qty' => $qty
|
358 |
+
] ) )
|
359 |
];
|
360 |
}
|
361 |
if ($cart->needs_shipping ()) {
|
362 |
$items[] = [
|
363 |
'label' => __ ( 'Shipping', 'woo-stripe-payment' ),
|
364 |
'pending' => false,
|
365 |
+
'amount' => wc_stripe_add_number_precision ( $incl_tax ? $cart->shipping_total + $cart->shipping_tax_total : $cart->shipping_total )
|
366 |
];
|
367 |
}
|
368 |
|
370 |
foreach ( $cart->get_fees () as $fee ) {
|
371 |
$items[] = [ 'label' => $fee->name,
|
372 |
'pending' => false,
|
373 |
+
'amount' => wc_stripe_add_number_precision ( $incl_tax ? $fee->total + $fee->tax : $fee->total )
|
374 |
];
|
375 |
}
|
376 |
// coupons
|
378 |
$items[] = [
|
379 |
'label' => __ ( 'Discount', 'woo-stripe-payment' ),
|
380 |
'pending' => false,
|
381 |
+
'amount' => wc_stripe_add_number_precision ( - 1 * abs ( $incl_tax ? $cart->discount_cart + $cart->discount_cart_tax : $cart->discount_cart ) )
|
382 |
];
|
383 |
}
|
384 |
|
385 |
+
if (! $incl_tax && wc_tax_enabled ()) {
|
386 |
$items[] = [
|
387 |
'label' => __ ( 'Tax', 'woo-stripe-payment' ),
|
388 |
'pending' => false,
|
455 |
*/
|
456 |
function wc_stripe_get_shipping_options($encode = false, $order = null) {
|
457 |
$methods = [];
|
458 |
+
$incl_tax = wc_stripe_display_prices_including_tax ();
|
459 |
if (! $order) {
|
460 |
$ids = [];
|
461 |
$chosen_shipping_methods = WC ()->session->get ( 'chosen_shipping_methods', [] );
|
466 |
*
|
467 |
* @var WC_Shipping_Rate $rate
|
468 |
*/
|
469 |
+
$method = [
|
470 |
'id' => sprintf ( '%s:%s', $i, $rate->id ),
|
471 |
'label' => sprintf ( '%s', esc_attr ( $rate->get_label () ) ),
|
472 |
'detail' => '',
|
473 |
+
'amount' => wc_stripe_add_number_precision ( $incl_tax ? $rate->cost + $rate->get_shipping_tax () : $rate->cost )
|
474 |
];
|
475 |
+
if ($incl_tax) {
|
476 |
+
if ($rate->get_shipping_tax () > 0 && ! wc_prices_include_tax ()) {
|
477 |
+
$method[ 'detail' ] = WC ()->countries->inc_tax_or_vat ();
|
478 |
+
}
|
479 |
+
} else {
|
480 |
+
if ($rate->get_shipping_tax () > 0 && wc_prices_include_tax ()) {
|
481 |
+
$method[ 'detail' ] = WC ()->countries->ex_tax_or_vat ();
|
482 |
+
}
|
483 |
+
}
|
484 |
+
$methods[] = $method;
|
485 |
$ids[] = $rate->id;
|
486 |
}
|
487 |
// Stripe always shows the first shipping option as selected. Make sure the chosen method
|
504 |
];
|
505 |
}
|
506 |
}
|
507 |
+
/**
|
508 |
+
*
|
509 |
+
* @param array $methods
|
510 |
+
* @param WC_Order $orer
|
511 |
+
*/
|
512 |
$methods = apply_filters ( 'wc_stripe_get_shipping_options', $methods, $order );
|
513 |
return $encode ? htmlspecialchars ( wp_json_encode ( $methods ) ) : $methods;
|
514 |
}
|
606 |
* @return array
|
607 |
*/
|
608 |
function wc_stripe_get_local_payment_params() {
|
609 |
+
global $wp;
|
610 |
$data = [];
|
611 |
$gateways = WC ()->payment_gateways ()->payment_gateways ();
|
612 |
foreach ( $gateways as $gateway ) {
|
613 |
if ($gateway instanceof WC_Payment_Gateway_Stripe_Local_Payment && $gateway->is_available ()) {
|
614 |
$data[ 'gateways' ][ $gateway->id ] = $gateway->get_localized_params ();
|
615 |
+
if (isset ( $wp->query_vars[ 'order-pay' ] )) {
|
616 |
+
$data[ 'gateways' ][ $gateway->id ][ 'order_id' ] = $wp->query_vars[ 'order-pay' ];
|
617 |
+
}
|
618 |
}
|
619 |
}
|
620 |
$data[ 'api_key' ] = wc_stripe_get_publishable_key ();
|
933 |
$cart = WC ()->cart;
|
934 |
if (method_exists ( $cart, 'display_prices_including_tax' )) {
|
935 |
return $cart->display_prices_including_tax ();
|
|
|
|
|
|
|
|
|
936 |
}
|
937 |
+
return 'incl' == $cart->tax_display_cart && ( WC ()->customer && ! WC ()->customer->is_vat_exempt () );
|
938 |
}
|
939 |
|
940 |
/**
|
1076 |
function wc_stripe_get_error_messages() {
|
1077 |
return apply_filters ( 'wc_stripe_get_error_messages', [
|
1078 |
'stripe_cc_generic' => __ ( 'There was an error processing your credit card.', 'woo-stripe-payment' ),
|
1079 |
+
'incomplete_number' => __ ( 'Your card number is incomplete.', 'woo-stripe-payment' ),
|
1080 |
'incorrect_number' => __ ( 'The card number is incorrect. Check the card\'s number or use a different card.', 'woo-stripe-payment' ),
|
1081 |
'incorrect_cvc' => __ ( 'The card\'s security code is incorrect. Check the card\'s security code or use a different card.', 'woo-stripe-payment' ),
|
1082 |
'incorrect_zip' => __ ( 'The card\'s ZIP code is incorrect. Check the card\'s ZIP code or use a different card.', 'woo-stripe-payment' ),
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: stripe, ach, klarna, credit card, apple pay, google pay, ideal, sepa, sofo
|
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 3.1.
|
8 |
Copyright: Payment Plugins
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -54,8 +54,15 @@ If you're site is not loading over https, then Stripe won't render the Payment R
|
|
54 |
5. Local payment methods like iDEAL and P24
|
55 |
6. Configuration pages
|
56 |
7. Payment options at top of checkout page for easy one click checkout
|
|
|
57 |
|
58 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
= 3.1.1 =
|
60 |
* Fixed - Error when changing WCS payment method to new ACH payment method
|
61 |
* Fixed - Error when payment_intent status 'success' and order cancelled status applied
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 5.4
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 3.1.2
|
8 |
Copyright: Payment Plugins
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
54 |
5. Local payment methods like iDEAL and P24
|
55 |
6. Configuration pages
|
56 |
7. Payment options at top of checkout page for easy one click checkout
|
57 |
+
8. Edit payment gateways on the product page
|
58 |
|
59 |
== Changelog ==
|
60 |
+
= 3.1.2 =
|
61 |
+
* Added - Merchants can now control which payment buttons appear for each product and their positioning
|
62 |
+
* Added - VAT tax display for Apple Pay, GPay, Payment Request
|
63 |
+
* Added - Optional Stripe email receipt
|
64 |
+
* Updated - Stripe API version to 2020-03-02
|
65 |
+
* Fixed - iDEAL not redirecting on order pay page.
|
66 |
= 3.1.1 =
|
67 |
* Fixed - Error when changing WCS payment method to new ACH payment method
|
68 |
* Fixed - Error when payment_intent status 'success' and order cancelled status applied
|
stripe-payments.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
* Plugin Name: Stripe For WooCommerce
|
4 |
* Plugin URI: https://docs.paymentplugins.com/wc-stripe/config/
|
5 |
* Description: Accept credit cards, Google Pay, & Apple Pay, ACH, Klarna and more using Stripe.
|
6 |
-
* Version: 3.1.
|
7 |
* Author: Payment Plugins, support@paymentplugins.com
|
8 |
* Text Domain: woo-stripe-payment
|
9 |
* Domain Path: /i18n/languages/
|
10 |
* Tested up to: 5.4
|
11 |
* WC requires at least: 3.0.0
|
12 |
-
* WC tested up to: 4.0
|
13 |
*/
|
14 |
defined ( 'ABSPATH' ) || exit ();
|
15 |
|
3 |
* Plugin Name: Stripe For WooCommerce
|
4 |
* Plugin URI: https://docs.paymentplugins.com/wc-stripe/config/
|
5 |
* Description: Accept credit cards, Google Pay, & Apple Pay, ACH, Klarna and more using Stripe.
|
6 |
+
* Version: 3.1.2
|
7 |
* Author: Payment Plugins, support@paymentplugins.com
|
8 |
* Text Domain: woo-stripe-payment
|
9 |
* Domain Path: /i18n/languages/
|
10 |
* Tested up to: 5.4
|
11 |
* WC requires at least: 3.0.0
|
12 |
+
* WC tested up to: 4.1.0
|
13 |
*/
|
14 |
defined ( 'ABSPATH' ) || exit ();
|
15 |
|
templates/product/payment-methods.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*/
|
5 |
?>
|
6 |
<div class="wc-stripe-clear"></div>
|
7 |
-
<div class="wc-stripe-product-checkout-container">
|
8 |
<ul class="wc_stripe_product_payment_methods">
|
9 |
<?php foreach($gateways as $gateway):?>
|
10 |
<li class="payment_method_<?php echo esc_attr($gateway->id)?>">
|
4 |
*/
|
5 |
?>
|
6 |
<div class="wc-stripe-clear"></div>
|
7 |
+
<div class="wc-stripe-product-checkout-container <?php echo $position?>">
|
8 |
<ul class="wc_stripe_product_payment_methods">
|
9 |
<?php foreach($gateways as $gateway):?>
|
10 |
<li class="payment_method_<?php echo esc_attr($gateway->id)?>">
|