From 40e03062a90b2fcdc9a1823007520e9741a846cf Mon Sep 17 00:00:00 2001 From: Tom Jordan Date: Fri, 6 Apr 2018 13:45:01 +0100 Subject: [PATCH 1/2] Create empty string if address_state is null --- .../web/js/view/payment/method-renderer/pmclain_stripe.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js b/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js index ed343bf..66f9a67 100755 --- a/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js +++ b/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js @@ -332,8 +332,12 @@ define( stripeData.address_state = billingAddress.regionCode; } + if (stripeData.address_state == null){ + stripeData.address_state = ''; + } + return stripeData; } }); } -); \ No newline at end of file +); From d086eff9f1553e5b1b0a8a4761bace3634a5d236 Mon Sep 17 00:00:00 2001 From: Tom Jordan Date: Fri, 6 Apr 2018 13:47:21 +0100 Subject: [PATCH 2/2] Set empty if null address_state for OwnerData --- .../web/js/view/payment/method-renderer/pmclain_stripe.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js b/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js index 66f9a67..7ad3b1a 100755 --- a/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js +++ b/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js @@ -308,6 +308,10 @@ define( ownerData.owner.address.state = billingAddress.regionCode; } + if (stripeData.address_state == null){ + stripeData.address_state = ''; + } + return ownerData; },