WooCommerce Stripe Payment Gateway - Version 4.2.4

Version Description

  • 2019-09-18 =
  • Fix - Unclear error message when email address not completely filled in.
  • Fix - Add payment request button compatibility with variable subscriptions
  • Tweak - Do not show payment request button for shippable trial subscription products
  • Fix - Do not copy the payment intent id when creating a subscription renewal
  • Fix - Return early from check intent status if no order - props strayobject
  • Fix - Extend webhook time window from 1 to 5 minutes to match Stripe client
  • Update - WooCommerce 3.7 compatibility
  • Update - Apple Pay Domain association file
  • Update - Grandfather pre-SCA subscription renewals for SCA

See changelog for all versions.

=

Download this release

Release Info

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

Code changes from version 4.2.3 to 4.2.4

apple-developer-merchantid-domain-association CHANGED
@@ -1 +1 @@
1
- 7B227073704964223A2239373943394538343346343131343044463144313834343232393232313734313034353044314339464446394437384337313531303944334643463542433731222C2276657273696F6E223A312C22637265617465644F6E223A313437313435343137313137362C227369676E6174757265223A2233303830303630393261383634383836663730643031303730326130383033303830303230313031333130663330306430363039363038363438303136353033303430323031303530303330383030363039326138363438383666373064303130373031303030306130383033303832303365363330383230333862613030333032303130323032303836383630663639396439636361373066333030613036303832613836343863653364303430333032333037613331326533303263303630333535303430333063323534313730373036633635323034313730373036633639363336313734363936663665323034393665373436353637373236313734363936663665323034333431323032643230343733333331323633303234303630333535303430623063316434313730373036633635323034333635373237343639363636393633363137343639366636653230343137353734363836663732363937343739333131333330313130363033353530343061306330613431373037303663363532303439366536333265333130623330303930363033353530343036313330323535353333303165313730643331333633303336333033333331333833313336333433303561313730643332333133303336333033323331333833313336333433303561333036323331323833303236303630333535303430333063316636353633363332643733366437303264363237323666366236353732326437333639363736653566353534333334326435333431346534343432346635383331313433303132303630333535303430623063306236393466353332303533373937333734363536643733333131333330313130363033353530343061306330613431373037303663363532303439366536333265333130623330303930363033353530343036313330323535353333303539333031333036303732613836343863653364303230313036303832613836343863653364303330313037303334323030303438323330666461626333396366373565323032633530643939623435313265363337653261393031646436636233653062316364346235323637393866386366346562646538316132356138633231653463333364646365386532613936633266366166613139333033343563346538376134343236636539353162313239356133383230323131333038323032306433303435303630383262303630313035303530373031303130343339333033373330333530363038326230363031303530353037333030313836323936383734373437303361326632663666363337333730326536313730373036633635326536333666366432663666363337333730333033343264363137303730366336353631363936333631333333303332333031643036303335353164306530343136303431343032323433303062396165656564343633313937613461363561323939653432373138323163343533303063303630333535316431333031303166663034303233303030333031663036303335353164323330343138333031363830313432336632343963343466393365346566323765366334663632383663336661326262666432653462333038323031316430363033353531643230303438323031313433303832303131303330383230313063303630393261383634383836663736333634303530313330383166653330383163333036303832623036303130353035303730323032333038316236306338316233353236353663363936313665363336353230366636653230373436383639373332303633363537323734363936363639363336313734363532303632373932303631366537393230373036313732373437393230363137333733373536643635373332303631363336333635373037343631366536333635323036663636323037343638363532303734363836353665323036313730373036633639363336313632366336353230373337343631366536343631373236343230373436353732366437333230363136653634323036333666366536343639373436393666366537333230366636363230373537333635326332303633363537323734363936363639363336313734363532303730366636633639363337393230363136653634323036333635373237343639363636393633363137343639366636653230373037323631363337343639363336353230373337343631373436353664363536653734373332653330333630363038326230363031303530353037303230313136326136383734373437303361326632663737373737373265363137303730366336353265363336663664326636333635373237343639363636393633363137343635363137353734363836663732363937343739326633303334303630333535316431663034326433303262333032396130323761303235383632333638373437343730336132663266363337323663326536313730373036633635326536333666366432663631373037303663363536313639363336313333326536333732366333303065303630333535316430663031303166663034303430333032303738303330306630363039326138363438383666373633363430363164303430323035303033303061303630383261383634386365336430343033303230333439303033303436303232313030646131633633616538626535663634663865313165383635363933376239623639633437326265393365616333323333613136373933366534613864356538333032323130306264356166626638363966336330636132373462326664646534663731373135396362336264373139396232636130666634303964653635396138326232346433303832303265653330383230323735613030333032303130323032303834393664326662663361393864613937333030613036303832613836343863653364303430333032333036373331316233303139303630333535303430333063313234313730373036633635323035323666366637343230343334313230326432303437333333313236333032343036303335353034306230633164343137303730366336353230343336353732373436393636363936333631373436393666366532303431373537343638366637323639373437393331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533333031653137306433313334333033353330333633323333333433363333333035613137306433323339333033353330333633323333333433363333333035613330376133313265333032633036303335353034303330633235343137303730366336353230343137303730366336393633363137343639366636653230343936653734363536373732363137343639366636653230343334313230326432303437333333313236333032343036303335353034306230633164343137303730366336353230343336353732373436393636363936333631373436393666366532303431373537343638366637323639373437393331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533333035393330313330363037326138363438636533643032303130363038326138363438636533643033303130373033343230303034663031373131383431396437363438356435316135653235383130373736653838306132656664653762616534646530386466633462393365313333353664353636356233356165323264303937373630643232346537626261303866643736313763653838636237366262363637306265633865383239383466663534343561333831663733303831663433303436303630383262303630313035303530373031303130343361333033383330333630363038326230363031303530353037333030313836326136383734373437303361326632663666363337333730326536313730373036633635326536333666366432663666363337333730333033343264363137303730366336353732366636663734363336313637333333303164303630333535316430653034313630343134323366323439633434663933653465663237653663346636323836633366613262626664326534623330306630363033353531643133303130316666303430353330303330313031666633303166303630333535316432333034313833303136383031346262623064656131353833333838396161343861393964656265626465626166646163623234616233303337303630333535316431663034333033303265333032636130326161303238383632363638373437343730336132663266363337323663326536313730373036633635326536333666366432663631373037303663363537323666366637343633363136373333326536333732366333303065303630333535316430663031303166663034303430333032303130363330313030363061326138363438383666373633363430363032306530343032303530303330306130363038326138363438636533643034303330323033363730303330363430323330336163663732383335313136393962313836666233356333353663613632626666343137656464393066373534646132386562656631396338313565343262373839663839386637396235393966393864353431306438663964653963326665303233303332326464353434323162306133303537373663356466333338336239303637666431373763326332313664393634666336373236393832313236663534663837613764316239396362396230393839323136313036393930663039393231643030303033313832303136303330383230313563303230313031333038313836333037613331326533303263303630333535303430333063323534313730373036633635323034313730373036633639363336313734363936663665323034393665373436353637373236313734363936663665323034333431323032643230343733333331323633303234303630333535303430623063316434313730373036633635323034333635373237343639363636393633363137343639366636653230343137353734363836663732363937343739333131333330313130363033353530343061306330613431373037303663363532303439366536333265333130623330303930363033353530343036313330323535353330323038363836306636393964396363613730663330306430363039363038363438303136353033303430323031303530306130363933303138303630393261383634383836663730643031303930333331306230363039326138363438383666373064303130373031333031633036303932613836343838366637306430313039303533313066313730643331333633303338333133373331333733313336333133313561333032663036303932613836343838366637306430313039303433313232303432303733343832623432653665366332323264616536643963303961346336663332316534656136653666326661626631356430376562333338643264613435646233303061303630383261383634386365336430343033303230343438333034363032323130306564333264376438616131623536623036626164623162396639396264643063653662363931316530623032393232633934333362663564326130656135353830323231303066393433353637663030323361643061343561373236663238376636303062656334666566373335383832383935633733313531383337336163383934383137303030303030303030303030227D
1
+ 7B227073704964223A2239373943394538343346343131343044463144313834343232393232313734313034353044314339464446394437384337313531303944334643463542433731222C2276657273696F6E223A312C22637265617465644F6E223A313536363233343735303036312C227369676E6174757265223A22333038303036303932613836343838366637306430313037303261303830333038303032303130313331306633303064303630393630383634383031363530333034303230313035303033303830303630393261383634383836663730643031303730313030303061303830333038323033653333303832303338386130303330323031303230323038346333303431343935313964353433363330306130363038326138363438636533643034303330323330376133313265333032633036303335353034303330633235343137303730366336353230343137303730366336393633363137343639366636653230343936653734363536373732363137343639366636653230343334313230326432303437333333313236333032343036303335353034306230633164343137303730366336353230343336353732373436393636363936333631373436393666366532303431373537343638366637323639373437393331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533333031653137306433313339333033353331333833303331333333323335333735613137306433323334333033353331333633303331333333323335333735613330356633313235333032333036303335353034303330633163363536333633326437333664373032643632373236663662363537323264373336393637366535663535343333343264353035323466343433313134333031323036303335353034306230633062363934663533323035333739373337343635366437333331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533333035393330313330363037326138363438636533643032303130363038326138363438636533643033303130373033343230303034633231353737656465626436633762323231386636386464373039306131323138646337623062643666326332383364383436303935643934616634613534313162383334323065643831316633343037653833333331663163353463336637656233323230643662616435643465666634393238393839336537633066313361333832303231313330383230323064333030633036303335353164313330313031666630343032333030303330316630363033353531643233303431383330313638303134323366323439633434663933653465663237653663346636323836633366613262626664326534623330343530363038326230363031303530353037303130313034333933303337333033353036303832623036303130353035303733303031383632393638373437343730336132663266366636333733373032653631373037303663363532653633366636643266366636333733373033303334326436313730373036633635363136393633363133333330333233303832303131643036303335353164323030343832303131343330383230313130333038323031306330363039326138363438383666373633363430353031333038316665333038316333303630383262303630313035303530373032303233303831623630633831623335323635366336393631366536333635323036663665323037343638363937333230363336353732373436393636363936333631373436353230363237393230363136653739323037303631373237343739323036313733373337353664363537333230363136333633363537303734363136653633363532303666363632303734363836353230373436383635366532303631373037303663363936333631363236633635323037333734363136653634363137323634323037343635373236643733323036313665363432303633366636653634363937343639366636653733323036663636323037353733363532633230363336353732373436393636363936333631373436353230373036663663363936333739323036313665363432303633363537323734363936363639363336313734363936663665323037303732363136333734363936333635323037333734363137343635366436353665373437333265333033363036303832623036303130353035303730323031313632613638373437343730336132663266373737373737326536313730373036633635326536333666366432663633363537323734363936363639363336313734363536313735373436383666373236393734373932663330333430363033353531643166303432643330326233303239613032376130323538363233363837343734373033613266326636333732366332653631373037303663363532653633366636643266363137303730366336353631363936333631333332653633373236633330316430363033353531643065303431363034313439343537646236666435373438313836383938393736326637653537383530376537396235383234333030653036303335353164306630313031666630343034303330323037383033303066303630393261383634383836663736333634303631643034303230353030333030613036303832613836343863653364303430333032303334393030333034363032323130306265303935373166653731653165373335623535653561666163623463373266656234343566333031383532323263373235313030326236316562643666353530323231303064313862333530613564643664643665623137343630333562313165623263653837636661336536616636636264383338303839306463383263646461613633333038323032656533303832303237356130303330323031303230323038343936643266626633613938646139373330306130363038326138363438636533643034303330323330363733313162333031393036303335353034303330633132343137303730366336353230353236663666373432303433343132303264323034373333333132363330323430363033353530343062306331643431373037303663363532303433363537323734363936363639363336313734363936663665323034313735373436383666373236393734373933313133333031313036303335353034306130633061343137303730366336353230343936653633326533313062333030393036303335353034303631333032353535333330316531373064333133343330333533303336333233333334333633333330356131373064333233393330333533303336333233333334333633333330356133303761333132653330326330363033353530343033306332353431373037303663363532303431373037303663363936333631373436393666366532303439366537343635363737323631373436393666366532303433343132303264323034373333333132363330323430363033353530343062306331643431373037303663363532303433363537323734363936363639363336313734363936663665323034313735373436383666373236393734373933313133333031313036303335353034306130633061343137303730366336353230343936653633326533313062333030393036303335353034303631333032353535333330353933303133303630373261383634386365336430323031303630383261383634386365336430333031303730333432303030346630313731313834313964373634383564353161356532353831303737366538383061326566646537626165346465303864666334623933653133333536643536363562333561653232643039373736306432323465376262613038666437363137636538386362373662623636373062656338653832393834666635343435613338316637333038316634333034363036303832623036303130353035303730313031303433613330333833303336303630383262303630313035303530373330303138363261363837343734373033613266326636663633373337303265363137303730366336353265363336663664326636663633373337303330333432643631373037303663363537323666366637343633363136373333333031643036303335353164306530343136303431343233663234396334346639336534656632376536633466363238366333666132626266643265346233303066303630333535316431333031303166663034303533303033303130316666333031663036303335353164323330343138333031363830313462626230646561313538333338383961613438613939646562656264656261666461636232346162333033373036303335353164316630343330333032653330326361303261613032383836323636383734373437303361326632663633373236633265363137303730366336353265363336663664326636313730373036633635373236663666373436333631363733333265363337323663333030653036303335353164306630313031666630343034303330323031303633303130303630613261383634383836663736333634303630323065303430323035303033303061303630383261383634386365336430343033303230333637303033303634303233303361636637323833353131363939623138366662333563333536636136326266663431376564643930663735346461323865626566313963383135653432623738396638393866373962353939663938643534313064386639646539633266653032333033323264643534343231623061333035373736633564663333383362393036376664313737633263323136643936346663363732363938323132366635346638376137643162393963623962303938393231363130363939306630393932316430303030333138323031386233303832303138373032303130313330383138363330376133313265333032633036303335353034303330633235343137303730366336353230343137303730366336393633363137343639366636653230343936653734363536373732363137343639366636653230343334313230326432303437333333313236333032343036303335353034306230633164343137303730366336353230343336353732373436393636363936333631373436393666366532303431373537343638366637323639373437393331313333303131303630333535303430613063306134313730373036633635323034393665363332653331306233303039303630333535303430363133303235353533303230383463333034313439353139643534333633303064303630393630383634383031363530333034303230313035303061303831393533303138303630393261383634383836663730643031303930333331306230363039326138363438383666373064303130373031333031633036303932613836343838366637306430313039303533313066313730643331333933303338333133393331333733313332333333303561333032613036303932613836343838366637306430313039333433313164333031623330306430363039363038363438303136353033303430323031303530306131306130363038326138363438636533643034303330323330326630363039326138363438383666373064303130393034333132323034323062303731303365313430613462386231376262613230316130336163643036396234653431366232613263383066383661383338313435633239373566633131333030613036303832613836343863653364303430333032303434363330343430323230343639306264636637626461663833636466343934396534633035313039656463663334373665303564373261313264376335666538633033303033343464663032323032363764353863393365626233353031333836363062353730373938613064643731313734316262353864626436613138363633353038353431656565393035303030303030303030303030227D
assets/js/stripe-payment-request.js CHANGED
@@ -406,12 +406,9 @@ jQuery( function( $ ) {
406
  }
407
 
408
  if ( $( '#wc-stripe-payment-request-button' ).length ) {
 
409
  prButton.mount( '#wc-stripe-payment-request-button' );
410
- $( '#wc-stripe-payment-request-button-separator' ).show();
411
  }
412
- } else {
413
- $( '#wc-stripe-payment-request-button' ).hide();
414
- $( '#wc-stripe-payment-request-button-separator' ).hide();
415
  }
416
  } );
417
 
406
  }
407
 
408
  if ( $( '#wc-stripe-payment-request-button' ).length ) {
409
+ $( '#wc-stripe-payment-request-wrapper, #wc-stripe-payment-request-button-separator' ).show();
410
  prButton.mount( '#wc-stripe-payment-request-button' );
 
411
  }
 
 
 
412
  }
413
  } );
414
 
assets/js/stripe-payment-request.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(i){"use strict";var s,p=Stripe(wc_stripe_payment_request_params.stripe.key),o={getAjaxURL:function(t){return wc_stripe_payment_request_params.ajax_url.toString().replace("%%endpoint%%","wc_stripe_"+t)},getCartDetails:function(){var t={security:wc_stripe_payment_request_params.nonce.payment};i.ajax({type:"POST",data:t,url:o.getAjaxURL("get_cart_details"),success:function(t){o.startPaymentRequest(t)}})},getAttributes:function(){var t=i(".variations_form").find(".variations select"),a={},n=0,r=0;return t.each(function(){var t=i(this).data("attribute_name")||i(this).attr("name"),e=i(this).val()||"";0<e.length&&r++,n++,a[t]=e}),{count:n,chosenCount:r,data:a}},processSource:function(t,e){var a=o.getOrderData(t,e);return i.ajax({type:"POST",data:a,dataType:"json",url:o.getAjaxURL("create_order")})},getOrderData:function(t,e){var a=t.source,n=a.owner.email,r=a.owner.phone,i=a.owner.address,s=a.owner.name,p=t.shippingAddress,o={_wpnonce:wc_stripe_payment_request_params.nonce.checkout,billing_first_name:null!==s?s.split(" ").slice(0,1).join(" "):"",billing_last_name:null!==s?s.split(" ").slice(1).join(" "):"",billing_company:"",billing_email:null!==n?n:t.payerEmail,billing_phone:null!==r?r:t.payerPhone.replace("/[() -]/g",""),billing_country:null!==i?i.country:"",billing_address_1:null!==i?i.line1:"",billing_address_2:null!==i?i.line2:"",billing_city:null!==i?i.city:"",billing_state:null!==i?i.state:"",billing_postcode:null!==i?i.postal_code:"",shipping_first_name:"",shipping_last_name:"",shipping_company:"",shipping_country:"",shipping_address_1:"",shipping_address_2:"",shipping_city:"",shipping_state:"",shipping_postcode:"",shipping_method:[null===t.shippingOption?null:t.shippingOption.id],order_comments:"",payment_method:"stripe",ship_to_different_address:1,terms:1,stripe_source:a.id,payment_request_type:e};return p&&(o.shipping_first_name=p.recipient.split(" ").slice(0,1).join(" "),o.shipping_last_name=p.recipient.split(" ").slice(1).join(" "),o.shipping_company=p.organization,o.shipping_country=p.country,o.shipping_address_1=void 0===p.addressLine[0]?"":p.addressLine[0],o.shipping_address_2=void 0===p.addressLine[1]?"":p.addressLine[1],o.shipping_city=p.city,o.shipping_state=p.region,o.shipping_postcode=p.postalCode),o},getErrorMessageHTML:function(t){return i('<div class="woocommerce-error" />').text(t)},abortPayment:function(t,e){if(t.complete("fail"),i(".woocommerce-error").remove(),wc_stripe_payment_request_params.is_product_page){var a=i(".product");a.before(e),i("html, body").animate({scrollTop:a.prev(".woocommerce-error").offset().top},600)}else{var n=i(".shop_table.cart").closest("form");n.before(e),i("html, body").animate({scrollTop:n.prev(".woocommerce-error").offset().top},600)}},completePayment:function(t,e){o.block(),t.complete("success"),window.location=e},block:function(){i.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},updateShippingOptions:function(t,e){var a={security:wc_stripe_payment_request_params.nonce.shipping,country:e.country,state:e.region,postcode:e.postalCode,city:e.city,address:void 0===e.addressLine[0]?"":e.addressLine[0],address_2:void 0===e.addressLine[1]?"":e.addressLine[1],payment_request_type:s};return i.ajax({type:"POST",data:a,url:o.getAjaxURL("get_shipping_options")})},updateShippingDetails:function(t,e){var a={security:wc_stripe_payment_request_params.nonce.update_shipping,shipping_method:[e.id],payment_request_type:s};return i.ajax({type:"POST",data:a,url:o.getAjaxURL("update_shipping_method")})},addToCart:function(){var t=i(".single_add_to_cart_button").val();i(".single_variation_wrap").length&&(t=i(".single_variation_wrap").find('input[name="product_id"]').val());var e={security:wc_stripe_payment_request_params.nonce.add_to_cart,product_id:t,qty:i(".quantity .qty").val(),attributes:i(".variations_form").length?o.getAttributes().data:[]};return i.ajax({type:"POST",data:e,url:o.getAjaxURL("add_to_cart")})},clearCart:function(){var t={security:wc_stripe_payment_request_params.nonce.clear_cart};return i.ajax({type:"POST",data:t,url:o.getAjaxURL("clear_cart"),success:function(t){}})},getRequestOptionsFromLocal:function(){return{total:wc_stripe_payment_request_params.product.total,currency:wc_stripe_payment_request_params.checkout.currency_code,country:wc_stripe_payment_request_params.checkout.country_code,requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:wc_stripe_payment_request_params.product.requestShipping,displayItems:wc_stripe_payment_request_params.product.displayItems}},startPaymentRequest:function(t){var a,e;a=wc_stripe_payment_request_params.is_product_page?e=o.getRequestOptionsFromLocal():(e={total:t.order_data.total,currency:t.order_data.currency,country:t.order_data.country_code,requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:!!t.shipping_required,displayItems:t.order_data.displayItems},t.order_data);var n=p.paymentRequest(e),r=p.elements({locale:wc_stripe_payment_request_params.button.locale}).create("paymentRequestButton",{paymentRequest:n,style:{paymentRequestButton:{type:wc_stripe_payment_request_params.button.type,theme:wc_stripe_payment_request_params.button.theme,height:wc_stripe_payment_request_params.button.height+"px"}}});n.canMakePayment().then(function(t){var e=[];if(t){if(s=t.applePay?"apple_pay":"payment_request_api",wc_stripe_payment_request_params.is_product_page){var a=i(".single_add_to_cart_button");r.on("click",function(t){a.is(".disabled")?(t.preventDefault(),a.is(".wc-variation-is-unavailable")?window.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):a.is(".wc-variation-selection-needed")&&window.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text)):0<e.length?(t.preventDefault(),window.alert(e)):o.addToCart()}),i(document.body).on("woocommerce_variation_has_changed",function(){i("#wc-stripe-payment-request-button").block({message:null}),i.when(o.getSelectedProductData()).then(function(t){i.when(n.update({total:t.total,displayItems:t.displayItems})).then(function(){i("#wc-stripe-payment-request-button").unblock()})})}),i(".quantity").on("keyup",".qty",function(){i("#wc-stripe-payment-request-button").block({message:null}),e=[],i.when(o.getSelectedProductData()).then(function(t){t.error?(e=[t.error],i("#wc-stripe-payment-request-button").unblock()):i.when(n.update({total:t.total,displayItems:t.displayItems})).then(function(){i("#wc-stripe-payment-request-button").unblock()})})})}i("#wc-stripe-payment-request-button").length&&(r.mount("#wc-stripe-payment-request-button"),i("#wc-stripe-payment-request-button-separator").show())}else i("#wc-stripe-payment-request-button").hide(),i("#wc-stripe-payment-request-button-separator").hide()}),n.on("shippingaddresschange",function(e){i.when(o.updateShippingOptions(a,e.shippingAddress)).then(function(t){e.updateWith({status:t.result,shippingOptions:t.shipping_options,total:t.total,displayItems:t.displayItems})})}),n.on("shippingoptionchange",function(e){i.when(o.updateShippingDetails(a,e.shippingOption)).then(function(t){"success"===t.result&&e.updateWith({status:"success",total:t.total,displayItems:t.displayItems}),"fail"===t.result&&e.updateWith({status:"fail"})})}),n.on("source",function(e){"no"===wc_stripe_payment_request_params.stripe.allow_prepaid_card&&"prepaid"===e.source.card.funding?o.abortPayment(e,o.getErrorMessageHTML(wc_stripe_payment_request_params.i18n.no_prepaid_card)):i.when(o.processSource(e,s)).then(function(t){"success"===t.result?o.completePayment(e,t.redirect):o.abortPayment(e,t.messages)})})},getSelectedProductData:function(){var t=i(".single_add_to_cart_button").val();i(".single_variation_wrap").length&&(t=i(".single_variation_wrap").find('input[name="product_id"]').val());var e={security:wc_stripe_payment_request_params.nonce.get_selected_product_data,product_id:t,qty:i(".quantity .qty").val(),attributes:i(".variations_form").length?o.getAttributes().data:[]};return i.ajax({type:"POST",data:e,url:o.getAjaxURL("get_selected_product_data")})},init:function(){wc_stripe_payment_request_params.is_product_page?o.startPaymentRequest(""):o.getCartDetails()}};o.init(),i(document.body).on("updated_cart_totals",function(){o.init()}),i(document.body).on("updated_checkout",function(){o.init()})});
1
+ jQuery(function(i){"use strict";var s,p=Stripe(wc_stripe_payment_request_params.stripe.key),o={getAjaxURL:function(t){return wc_stripe_payment_request_params.ajax_url.toString().replace("%%endpoint%%","wc_stripe_"+t)},getCartDetails:function(){var t={security:wc_stripe_payment_request_params.nonce.payment};i.ajax({type:"POST",data:t,url:o.getAjaxURL("get_cart_details"),success:function(t){o.startPaymentRequest(t)}})},getAttributes:function(){var t=i(".variations_form").find(".variations select"),a={},n=0,r=0;return t.each(function(){var t=i(this).data("attribute_name")||i(this).attr("name"),e=i(this).val()||"";0<e.length&&r++,n++,a[t]=e}),{count:n,chosenCount:r,data:a}},processSource:function(t,e){var a=o.getOrderData(t,e);return i.ajax({type:"POST",data:a,dataType:"json",url:o.getAjaxURL("create_order")})},getOrderData:function(t,e){var a=t.source,n=a.owner.email,r=a.owner.phone,i=a.owner.address,s=a.owner.name,p=t.shippingAddress,o={_wpnonce:wc_stripe_payment_request_params.nonce.checkout,billing_first_name:null!==s?s.split(" ").slice(0,1).join(" "):"",billing_last_name:null!==s?s.split(" ").slice(1).join(" "):"",billing_company:"",billing_email:null!==n?n:t.payerEmail,billing_phone:null!==r?r:t.payerPhone.replace("/[() -]/g",""),billing_country:null!==i?i.country:"",billing_address_1:null!==i?i.line1:"",billing_address_2:null!==i?i.line2:"",billing_city:null!==i?i.city:"",billing_state:null!==i?i.state:"",billing_postcode:null!==i?i.postal_code:"",shipping_first_name:"",shipping_last_name:"",shipping_company:"",shipping_country:"",shipping_address_1:"",shipping_address_2:"",shipping_city:"",shipping_state:"",shipping_postcode:"",shipping_method:[null===t.shippingOption?null:t.shippingOption.id],order_comments:"",payment_method:"stripe",ship_to_different_address:1,terms:1,stripe_source:a.id,payment_request_type:e};return p&&(o.shipping_first_name=p.recipient.split(" ").slice(0,1).join(" "),o.shipping_last_name=p.recipient.split(" ").slice(1).join(" "),o.shipping_company=p.organization,o.shipping_country=p.country,o.shipping_address_1=void 0===p.addressLine[0]?"":p.addressLine[0],o.shipping_address_2=void 0===p.addressLine[1]?"":p.addressLine[1],o.shipping_city=p.city,o.shipping_state=p.region,o.shipping_postcode=p.postalCode),o},getErrorMessageHTML:function(t){return i('<div class="woocommerce-error" />').text(t)},abortPayment:function(t,e){if(t.complete("fail"),i(".woocommerce-error").remove(),wc_stripe_payment_request_params.is_product_page){var a=i(".product");a.before(e),i("html, body").animate({scrollTop:a.prev(".woocommerce-error").offset().top},600)}else{var n=i(".shop_table.cart").closest("form");n.before(e),i("html, body").animate({scrollTop:n.prev(".woocommerce-error").offset().top},600)}},completePayment:function(t,e){o.block(),t.complete("success"),window.location=e},block:function(){i.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},updateShippingOptions:function(t,e){var a={security:wc_stripe_payment_request_params.nonce.shipping,country:e.country,state:e.region,postcode:e.postalCode,city:e.city,address:void 0===e.addressLine[0]?"":e.addressLine[0],address_2:void 0===e.addressLine[1]?"":e.addressLine[1],payment_request_type:s};return i.ajax({type:"POST",data:a,url:o.getAjaxURL("get_shipping_options")})},updateShippingDetails:function(t,e){var a={security:wc_stripe_payment_request_params.nonce.update_shipping,shipping_method:[e.id],payment_request_type:s};return i.ajax({type:"POST",data:a,url:o.getAjaxURL("update_shipping_method")})},addToCart:function(){var t=i(".single_add_to_cart_button").val();i(".single_variation_wrap").length&&(t=i(".single_variation_wrap").find('input[name="product_id"]').val());var e={security:wc_stripe_payment_request_params.nonce.add_to_cart,product_id:t,qty:i(".quantity .qty").val(),attributes:i(".variations_form").length?o.getAttributes().data:[]};return i.ajax({type:"POST",data:e,url:o.getAjaxURL("add_to_cart")})},clearCart:function(){var t={security:wc_stripe_payment_request_params.nonce.clear_cart};return i.ajax({type:"POST",data:t,url:o.getAjaxURL("clear_cart"),success:function(t){}})},getRequestOptionsFromLocal:function(){return{total:wc_stripe_payment_request_params.product.total,currency:wc_stripe_payment_request_params.checkout.currency_code,country:wc_stripe_payment_request_params.checkout.country_code,requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:wc_stripe_payment_request_params.product.requestShipping,displayItems:wc_stripe_payment_request_params.product.displayItems}},startPaymentRequest:function(t){var a,e;a=wc_stripe_payment_request_params.is_product_page?e=o.getRequestOptionsFromLocal():(e={total:t.order_data.total,currency:t.order_data.currency,country:t.order_data.country_code,requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:!!t.shipping_required,displayItems:t.order_data.displayItems},t.order_data);var n=p.paymentRequest(e),r=p.elements({locale:wc_stripe_payment_request_params.button.locale}).create("paymentRequestButton",{paymentRequest:n,style:{paymentRequestButton:{type:wc_stripe_payment_request_params.button.type,theme:wc_stripe_payment_request_params.button.theme,height:wc_stripe_payment_request_params.button.height+"px"}}});n.canMakePayment().then(function(t){var e=[];if(t){if(s=t.applePay?"apple_pay":"payment_request_api",wc_stripe_payment_request_params.is_product_page){var a=i(".single_add_to_cart_button");r.on("click",function(t){a.is(".disabled")?(t.preventDefault(),a.is(".wc-variation-is-unavailable")?window.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):a.is(".wc-variation-selection-needed")&&window.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text)):0<e.length?(t.preventDefault(),window.alert(e)):o.addToCart()}),i(document.body).on("woocommerce_variation_has_changed",function(){i("#wc-stripe-payment-request-button").block({message:null}),i.when(o.getSelectedProductData()).then(function(t){i.when(n.update({total:t.total,displayItems:t.displayItems})).then(function(){i("#wc-stripe-payment-request-button").unblock()})})}),i(".quantity").on("keyup",".qty",function(){i("#wc-stripe-payment-request-button").block({message:null}),e=[],i.when(o.getSelectedProductData()).then(function(t){t.error?(e=[t.error],i("#wc-stripe-payment-request-button").unblock()):i.when(n.update({total:t.total,displayItems:t.displayItems})).then(function(){i("#wc-stripe-payment-request-button").unblock()})})})}i("#wc-stripe-payment-request-button").length&&(i("#wc-stripe-payment-request-wrapper, #wc-stripe-payment-request-button-separator").show(),r.mount("#wc-stripe-payment-request-button"))}}),n.on("shippingaddresschange",function(e){i.when(o.updateShippingOptions(a,e.shippingAddress)).then(function(t){e.updateWith({status:t.result,shippingOptions:t.shipping_options,total:t.total,displayItems:t.displayItems})})}),n.on("shippingoptionchange",function(e){i.when(o.updateShippingDetails(a,e.shippingOption)).then(function(t){"success"===t.result&&e.updateWith({status:"success",total:t.total,displayItems:t.displayItems}),"fail"===t.result&&e.updateWith({status:"fail"})})}),n.on("source",function(e){"no"===wc_stripe_payment_request_params.stripe.allow_prepaid_card&&"prepaid"===e.source.card.funding?o.abortPayment(e,o.getErrorMessageHTML(wc_stripe_payment_request_params.i18n.no_prepaid_card)):i.when(o.processSource(e,s)).then(function(t){"success"===t.result?o.completePayment(e,t.redirect):o.abortPayment(e,t.messages)})})},getSelectedProductData:function(){var t=i(".single_add_to_cart_button").val();i(".single_variation_wrap").length&&(t=i(".single_variation_wrap").find('input[name="product_id"]').val());var e={security:wc_stripe_payment_request_params.nonce.get_selected_product_data,product_id:t,qty:i(".quantity .qty").val(),attributes:i(".variations_form").length?o.getAttributes().data:[]};return i.ajax({type:"POST",data:e,url:o.getAjaxURL("get_selected_product_data")})},init:function(){wc_stripe_payment_request_params.is_product_page?o.startPaymentRequest(""):o.getCartDetails()}};o.init(),i(document.body).on("updated_cart_totals",function(){o.init()}),i(document.body).on("updated_checkout",function(){o.init()})});
assets/js/stripe.js CHANGED
@@ -4,9 +4,7 @@ jQuery( function( $ ) {
4
  'use strict';
5
 
6
  try {
7
- var stripe = Stripe( wc_stripe_params.key, {
8
- betas: [ 'payment_intent_beta_3' ],
9
- } );
10
  } catch( error ) {
11
  console.log( error );
12
  return;
@@ -464,21 +462,12 @@ jQuery( function( $ ) {
464
  delete owner.name;
465
  }
466
 
467
- if ( $( '#billing_address_1' ).length > 0 ) {
468
- owner.address.line1 = $( '#billing_address_1' ).val();
469
- owner.address.line2 = $( '#billing_address_2' ).val();
470
- owner.address.state = $( '#billing_state' ).val();
471
- owner.address.city = $( '#billing_city' ).val();
472
- owner.address.postal_code = $( '#billing_postcode' ).val();
473
- owner.address.country = $( '#billing_country' ).val();
474
- } else if ( wc_stripe_params.billing_address_1 ) {
475
- owner.address.line1 = wc_stripe_params.billing_address_1;
476
- owner.address.line2 = wc_stripe_params.billing_address_2;
477
- owner.address.state = wc_stripe_params.billing_state;
478
- owner.address.city = wc_stripe_params.billing_city;
479
- owner.address.postal_code = wc_stripe_params.billing_postcode;
480
- owner.address.country = wc_stripe_params.billing_country;
481
- }
482
 
483
  return {
484
  owner: owner,
@@ -644,11 +633,14 @@ jQuery( function( $ ) {
644
  }
645
  }
646
 
647
- /*
648
- * Customers do not need to know the specifics of the below type of errors
649
- * therefore return a generic localizable error message.
650
- */
651
- if (
 
 
 
652
  'invalid_request_error' === result.error.type ||
653
  'api_connection_error' === result.error.type ||
654
  'api_error' === result.error.type ||
4
  'use strict';
5
 
6
  try {
7
+ var stripe = Stripe( wc_stripe_params.key );
 
 
8
  } catch( error ) {
9
  console.log( error );
10
  return;
462
  delete owner.name;
463
  }
464
 
465
+ owner.address.line1 = $( '#billing_address_1' ).val() || wc_stripe_params.billing_address_1;
466
+ owner.address.line2 = $( '#billing_address_2' ).val() || wc_stripe_params.billing_address_2;
467
+ owner.address.state = $( '#billing_state' ).val() || wc_stripe_params.billing_state;
468
+ owner.address.city = $( '#billing_city' ).val() || wc_stripe_params.billing_city;
469
+ owner.address.postal_code = $( '#billing_postcode' ).val() || wc_stripe_params.billing_postcode;
470
+ owner.address.country = $( '#billing_country' ).val() || wc_stripe_params.billing_country;
 
 
 
 
 
 
 
 
 
471
 
472
  return {
473
  owner: owner,
633
  }
634
  }
635
 
636
+ // Notify users that the email is invalid.
637
+ if ( 'email_invalid' === result.error.code ) {
638
+ message = wc_stripe_params.email_invalid;
639
+ } else if (
640
+ /*
641
+ * Customers do not need to know the specifics of the below type of errors
642
+ * therefore return a generic localizable error message.
643
+ */
644
  'invalid_request_error' === result.error.type ||
645
  'api_connection_error' === result.error.type ||
646
  'api_error' === result.error.type ||
assets/js/stripe.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(c){"use strict";try{var n=Stripe(wc_stripe_params.key,{betas:["payment_intent_beta_3"]})}catch(e){return void console.log(e)}var t,o,i,e=Object.keys(wc_stripe_params.elements_options).length?wc_stripe_params.elements_options:{},r=Object.keys(wc_stripe_params.sepa_elements_options).length?wc_stripe_params.sepa_elements_options:{},s=n.elements(e),a=s.create("iban",r),m={getAjaxURL:function(e){return wc_stripe_params.ajaxurl.toString().replace("%%endpoint%%","wc_stripe_"+e)},unmountElements:function(){"yes"===wc_stripe_params.inline_cc_form?t.unmount("#stripe-card-element"):(t.unmount("#stripe-card-element"),o.unmount("#stripe-exp-element"),i.unmount("#stripe-cvc-element"))},mountElements:function(){if(c("#stripe-card-element").length){if("yes"===wc_stripe_params.inline_cc_form)return t.mount("#stripe-card-element");t.mount("#stripe-card-element"),o.mount("#stripe-exp-element"),i.mount("#stripe-cvc-element")}},createElements:function(){var e={base:{iconColor:"#666EE8",color:"#31325F",fontSize:"15px","::placeholder":{color:"#CFD7E0"}}},r={focus:"focused",empty:"empty",invalid:"invalid"};e=wc_stripe_params.elements_styling?wc_stripe_params.elements_styling:e,r=wc_stripe_params.elements_classes?wc_stripe_params.elements_classes:r,"yes"===wc_stripe_params.inline_cc_form?(t=s.create("card",{style:e,hidePostalCode:!0})).addEventListener("change",function(e){m.onCCFormChange(),e.error&&c(document.body).trigger("stripeError",e)}):(t=s.create("cardNumber",{style:e,classes:r}),o=s.create("cardExpiry",{style:e,classes:r}),i=s.create("cardCvc",{style:e,classes:r}),t.addEventListener("change",function(e){m.onCCFormChange(),m.updateCardBrand(e.brand),e.error&&c(document.body).trigger("stripeError",e)}),o.addEventListener("change",function(e){m.onCCFormChange(),e.error&&c(document.body).trigger("stripeError",e)}),i.addEventListener("change",function(e){m.onCCFormChange(),e.error&&c(document.body).trigger("stripeError",e)})),"yes"===wc_stripe_params.is_checkout?c(document.body).on("updated_checkout",function(){t&&m.unmountElements(),m.mountElements(),c("#stripe-iban-element").length&&a.mount("#stripe-iban-element")}):(c("form#add_payment_method").length||c("form#order_review").length)&&(m.mountElements(),c("#stripe-iban-element").length&&a.mount("#stripe-iban-element"))},updateCardBrand:function(e){var r={visa:"stripe-visa-brand",mastercard:"stripe-mastercard-brand",amex:"stripe-amex-brand",discover:"stripe-discover-brand",diners:"stripe-diners-brand",jcb:"stripe-jcb-brand",unknown:"stripe-credit-card-brand"},t=c(".stripe-card-brand"),n="stripe-credit-card-brand";e in r&&(n=r[e]),c.each(r,function(e,r){t.removeClass(r)}),t.addClass(n)},init:function(){"yes"!==wc_stripe_params.is_change_payment_page&&"yes"!==wc_stripe_params.is_pay_for_order_page||c(document.body).trigger("wc-credit-card-form-init"),c("form.woocommerce-checkout").length&&(this.form=c("form.woocommerce-checkout")),c("form.woocommerce-checkout").on("checkout_place_order_stripe checkout_place_order_stripe_bancontact checkout_place_order_stripe_sofort checkout_place_order_stripe_giropay checkout_place_order_stripe_ideal checkout_place_order_stripe_alipay checkout_place_order_stripe_sepa",this.onSubmit),c("form#order_review").length&&(this.form=c("form#order_review")),c("form#order_review, form#add_payment_method").on("submit",this.onSubmit),c("form#add_payment_method").length&&(this.form=c("form#add_payment_method")),c("form.woocommerce-checkout").on("change",this.reset),c(document).on("stripeError",this.onError).on("checkout_error",this.reset),a.on("change",this.onSepaError),m.createElements(),window.addEventListener("hashchange",m.onHashChange),m.maybeConfirmIntent()},isStripeChosen:function(){return c("#payment_method_stripe, #payment_method_stripe_bancontact, #payment_method_stripe_sofort, #payment_method_stripe_giropay, #payment_method_stripe_ideal, #payment_method_stripe_alipay, #payment_method_stripe_sepa, #payment_method_stripe_eps, #payment_method_stripe_multibanco").is(":checked")||c("#payment_method_stripe").is(":checked")&&"new"===c('input[name="wc-stripe-payment-token"]:checked').val()||c("#payment_method_stripe_sepa").is(":checked")&&"new"===c('input[name="wc-stripe-payment-token"]:checked').val()},isStripeSaveCardChosen:function(){return c("#payment_method_stripe").is(":checked")&&c('input[name="wc-stripe-payment-token"]').is(":checked")&&"new"!==c('input[name="wc-stripe-payment-token"]:checked').val()||c("#payment_method_stripe_sepa").is(":checked")&&c('input[name="wc-stripe_sepa-payment-token"]').is(":checked")&&"new"!==c('input[name="wc-stripe_sepa-payment-token"]:checked').val()},isStripeCardChosen:function(){return c("#payment_method_stripe").is(":checked")},isBancontactChosen:function(){return c("#payment_method_stripe_bancontact").is(":checked")},isGiropayChosen:function(){return c("#payment_method_stripe_giropay").is(":checked")},isIdealChosen:function(){return c("#payment_method_stripe_ideal").is(":checked")},isSofortChosen:function(){return c("#payment_method_stripe_sofort").is(":checked")},isAlipayChosen:function(){return c("#payment_method_stripe_alipay").is(":checked")},isSepaChosen:function(){return c("#payment_method_stripe_sepa").is(":checked")},isP24Chosen:function(){return c("#payment_method_stripe_p24").is(":checked")},isEpsChosen:function(){return c("#payment_method_stripe_eps").is(":checked")},isMultibancoChosen:function(){return c("#payment_method_stripe_multibanco").is(":checked")},hasSource:function(){return 0<c("input.stripe-source").length},isMobile:function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},block:function(){m.isMobile()||m.form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){m.form&&m.form.unblock()},getSelectedPaymentElement:function(){return c('.payment_methods input[name="payment_method"]:checked')},getOwnerDetails:function(){var e=c("#billing_first_name").length?c("#billing_first_name").val():wc_stripe_params.billing_first_name,r=c("#billing_last_name").length?c("#billing_last_name").val():wc_stripe_params.billing_last_name,t={name:"",address:{},email:"",phone:""};return t.name=e,t.name=e&&r?e+" "+r:c("#stripe-payment-data").data("full-name"),t.email=c("#billing_email").val(),t.phone=c("#billing_phone").val(),(void 0===t.phone||t.phone.length<=0)&&delete t.phone,(void 0===t.email||t.email.length<=0)&&(c("#stripe-payment-data").data("email").length?t.email=c("#stripe-payment-data").data("email"):delete t.email),(void 0===t.name||t.name.length<=0)&&delete t.name,0<c("#billing_address_1").length?(t.address.line1=c("#billing_address_1").val(),t.address.line2=c("#billing_address_2").val(),t.address.state=c("#billing_state").val(),t.address.city=c("#billing_city").val(),t.address.postal_code=c("#billing_postcode").val(),t.address.country=c("#billing_country").val()):wc_stripe_params.billing_address_1&&(t.address.line1=wc_stripe_params.billing_address_1,t.address.line2=wc_stripe_params.billing_address_2,t.address.state=wc_stripe_params.billing_state,t.address.city=wc_stripe_params.billing_city,t.address.postal_code=wc_stripe_params.billing_postcode,t.address.country=wc_stripe_params.billing_country),{owner:t}},createSource:function(){var e=m.getOwnerDetails();return m.isSepaChosen()?(e.currency=c("#stripe-sepa_debit-payment-data").data("currency"),e.mandate={notification_method:wc_stripe_params.sepa_mandate_notification},e.type="sepa_debit",n.createSource(a,e).then(m.sourceResponse)):n.createSource(t,e).then(m.sourceResponse)},sourceResponse:function(e){if(e.error)return c(document.body).trigger("stripeError",e);m.reset(),m.form.append(c('<input type="hidden" />').addClass("stripe-source").attr("name","stripe_source").val(e.source.id)),c("form#add_payment_method").length&&c(m.form).off("submit",m.form.onSubmit),m.form.submit()},onSubmit:function(){return!m.isStripeChosen()||(!(!m.isStripeSaveCardChosen()&&!m.hasSource())||(!!(m.isBancontactChosen()||m.isGiropayChosen()||m.isIdealChosen()||m.isAlipayChosen()||m.isSofortChosen()||m.isP24Chosen()||m.isEpsChosen()||m.isMultibancoChosen())||(m.block(),m.createSource(),!1)))},onCCFormChange:function(){m.reset()},reset:function(){c(".wc-stripe-error, .stripe-source").remove()},onSepaError:function(e){var r=m.getSelectedPaymentElement().parents("li").eq(0).find(".stripe-source-errors");if(!e.error)return c(r).html("");console.log(e.error.message),c(r).html('<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li /></ul>'),c(r).find("li").text(e.error.message)},onError:function(e,r){var t,n=r.error.message,o=m.getSelectedPaymentElement().closest("li"),i=o.find(".woocommerce-SavedPaymentMethods-tokenInput");if(i.length){var s=i.filter(":checked");t=s.closest(".woocommerce-SavedPaymentMethods-new").length?c("#wc-stripe-cc-form .stripe-source-errors"):s.closest("li").find(".stripe-source-errors")}else t=o.find(".stripe-source-errors");if(m.isSepaChosen()&&"invalid_owner_name"===r.error.code&&wc_stripe_params.hasOwnProperty(r.error.code)){var a='<ul class="woocommerce-error"><li /></ul>';return a.find("li").text(wc_stripe_params[r.error.code]),m.submitError(a)}"invalid_request_error"!==r.error.type&&"api_connection_error"!==r.error.type&&"api_error"!==r.error.type&&"authentication_error"!==r.error.type&&"rate_limit_error"!==r.error.type||(n=wc_stripe_params.invalid_request_error),"card_error"===r.error.type&&wc_stripe_params.hasOwnProperty(r.error.code)&&(n=wc_stripe_params[r.error.code]),"validation_error"===r.error.type&&wc_stripe_params.hasOwnProperty(r.error.code)&&(n=wc_stripe_params[r.error.code]),m.reset(),c(".woocommerce-NoticeGroup-checkout").remove(),console.log(r.error.message),c(t).html('<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li /></ul>'),c(t).find("li").text(n),c(".wc-stripe-error").length&&c("html, body").animate({scrollTop:c(".wc-stripe-error").offset().top-200},200),m.unblock(),c.unblockUI()},submitError:function(e){c(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),m.form.prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'+e+"</div>"),m.form.removeClass("processing").unblock(),m.form.find(".input-text, select, input:checkbox").blur();var r="";c("#add_payment_method").length&&(r=c("#add_payment_method")),c("#order_review").length&&(r=c("#order_review")),c("form.checkout").length&&(r=c("form.checkout")),r.length&&c("html, body").animate({scrollTop:r.offset().top-100},500),c(document.body).trigger("checkout_error"),m.unblock()},onHashChange:function(){var e=window.location.hash.match(/^#?confirm-pi-([^:]+):(.+)$/);if(e&&!(e.length<3)){var r=e[1],t=decodeURIComponent(e[2]);window.location.hash="",m.openIntentModal(r,t)}},maybeConfirmIntent:function(){if(c("#stripe-intent-id").length&&c("#stripe-intent-return").length){var e=c("#stripe-intent-id").val(),r=c("#stripe-intent-return").val();m.openIntentModal(e,r,!0)}},openIntentModal:function(e,r,t){n.handleCardPayment(e).then(function(e){if(e.error)throw e.error;"requires_capture"!==e.paymentIntent.status&&"succeeded"!==e.paymentIntent.status||(window.location=r)}).catch(function(e){if(t)return window.location=r;c(document.body).trigger("stripeError",{error:e}),m.form&&m.form.removeClass("processing"),c.get(r+"&is_ajax")})}};m.init()});
1
+ jQuery(function(c){"use strict";try{var n=Stripe(wc_stripe_params.key)}catch(e){return void console.log(e)}var t,o,i,e=Object.keys(wc_stripe_params.elements_options).length?wc_stripe_params.elements_options:{},r=Object.keys(wc_stripe_params.sepa_elements_options).length?wc_stripe_params.sepa_elements_options:{},s=n.elements(e),a=s.create("iban",r),m={getAjaxURL:function(e){return wc_stripe_params.ajaxurl.toString().replace("%%endpoint%%","wc_stripe_"+e)},unmountElements:function(){"yes"===wc_stripe_params.inline_cc_form?t.unmount("#stripe-card-element"):(t.unmount("#stripe-card-element"),o.unmount("#stripe-exp-element"),i.unmount("#stripe-cvc-element"))},mountElements:function(){if(c("#stripe-card-element").length){if("yes"===wc_stripe_params.inline_cc_form)return t.mount("#stripe-card-element");t.mount("#stripe-card-element"),o.mount("#stripe-exp-element"),i.mount("#stripe-cvc-element")}},createElements:function(){var e={base:{iconColor:"#666EE8",color:"#31325F",fontSize:"15px","::placeholder":{color:"#CFD7E0"}}},r={focus:"focused",empty:"empty",invalid:"invalid"};e=wc_stripe_params.elements_styling?wc_stripe_params.elements_styling:e,r=wc_stripe_params.elements_classes?wc_stripe_params.elements_classes:r,"yes"===wc_stripe_params.inline_cc_form?(t=s.create("card",{style:e,hidePostalCode:!0})).addEventListener("change",function(e){m.onCCFormChange(),e.error&&c(document.body).trigger("stripeError",e)}):(t=s.create("cardNumber",{style:e,classes:r}),o=s.create("cardExpiry",{style:e,classes:r}),i=s.create("cardCvc",{style:e,classes:r}),t.addEventListener("change",function(e){m.onCCFormChange(),m.updateCardBrand(e.brand),e.error&&c(document.body).trigger("stripeError",e)}),o.addEventListener("change",function(e){m.onCCFormChange(),e.error&&c(document.body).trigger("stripeError",e)}),i.addEventListener("change",function(e){m.onCCFormChange(),e.error&&c(document.body).trigger("stripeError",e)})),"yes"===wc_stripe_params.is_checkout?c(document.body).on("updated_checkout",function(){t&&m.unmountElements(),m.mountElements(),c("#stripe-iban-element").length&&a.mount("#stripe-iban-element")}):(c("form#add_payment_method").length||c("form#order_review").length)&&(m.mountElements(),c("#stripe-iban-element").length&&a.mount("#stripe-iban-element"))},updateCardBrand:function(e){var r={visa:"stripe-visa-brand",mastercard:"stripe-mastercard-brand",amex:"stripe-amex-brand",discover:"stripe-discover-brand",diners:"stripe-diners-brand",jcb:"stripe-jcb-brand",unknown:"stripe-credit-card-brand"},t=c(".stripe-card-brand"),n="stripe-credit-card-brand";e in r&&(n=r[e]),c.each(r,function(e,r){t.removeClass(r)}),t.addClass(n)},init:function(){"yes"!==wc_stripe_params.is_change_payment_page&&"yes"!==wc_stripe_params.is_pay_for_order_page||c(document.body).trigger("wc-credit-card-form-init"),c("form.woocommerce-checkout").length&&(this.form=c("form.woocommerce-checkout")),c("form.woocommerce-checkout").on("checkout_place_order_stripe checkout_place_order_stripe_bancontact checkout_place_order_stripe_sofort checkout_place_order_stripe_giropay checkout_place_order_stripe_ideal checkout_place_order_stripe_alipay checkout_place_order_stripe_sepa",this.onSubmit),c("form#order_review").length&&(this.form=c("form#order_review")),c("form#order_review, form#add_payment_method").on("submit",this.onSubmit),c("form#add_payment_method").length&&(this.form=c("form#add_payment_method")),c("form.woocommerce-checkout").on("change",this.reset),c(document).on("stripeError",this.onError).on("checkout_error",this.reset),a.on("change",this.onSepaError),m.createElements(),window.addEventListener("hashchange",m.onHashChange),m.maybeConfirmIntent()},isStripeChosen:function(){return c("#payment_method_stripe, #payment_method_stripe_bancontact, #payment_method_stripe_sofort, #payment_method_stripe_giropay, #payment_method_stripe_ideal, #payment_method_stripe_alipay, #payment_method_stripe_sepa, #payment_method_stripe_eps, #payment_method_stripe_multibanco").is(":checked")||c("#payment_method_stripe").is(":checked")&&"new"===c('input[name="wc-stripe-payment-token"]:checked').val()||c("#payment_method_stripe_sepa").is(":checked")&&"new"===c('input[name="wc-stripe-payment-token"]:checked').val()},isStripeSaveCardChosen:function(){return c("#payment_method_stripe").is(":checked")&&c('input[name="wc-stripe-payment-token"]').is(":checked")&&"new"!==c('input[name="wc-stripe-payment-token"]:checked').val()||c("#payment_method_stripe_sepa").is(":checked")&&c('input[name="wc-stripe_sepa-payment-token"]').is(":checked")&&"new"!==c('input[name="wc-stripe_sepa-payment-token"]:checked').val()},isStripeCardChosen:function(){return c("#payment_method_stripe").is(":checked")},isBancontactChosen:function(){return c("#payment_method_stripe_bancontact").is(":checked")},isGiropayChosen:function(){return c("#payment_method_stripe_giropay").is(":checked")},isIdealChosen:function(){return c("#payment_method_stripe_ideal").is(":checked")},isSofortChosen:function(){return c("#payment_method_stripe_sofort").is(":checked")},isAlipayChosen:function(){return c("#payment_method_stripe_alipay").is(":checked")},isSepaChosen:function(){return c("#payment_method_stripe_sepa").is(":checked")},isP24Chosen:function(){return c("#payment_method_stripe_p24").is(":checked")},isEpsChosen:function(){return c("#payment_method_stripe_eps").is(":checked")},isMultibancoChosen:function(){return c("#payment_method_stripe_multibanco").is(":checked")},hasSource:function(){return 0<c("input.stripe-source").length},isMobile:function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},block:function(){m.isMobile()||m.form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){m.form&&m.form.unblock()},getSelectedPaymentElement:function(){return c('.payment_methods input[name="payment_method"]:checked')},getOwnerDetails:function(){var e=c("#billing_first_name").length?c("#billing_first_name").val():wc_stripe_params.billing_first_name,r=c("#billing_last_name").length?c("#billing_last_name").val():wc_stripe_params.billing_last_name,t={name:"",address:{},email:"",phone:""};return t.name=e,t.name=e&&r?e+" "+r:c("#stripe-payment-data").data("full-name"),t.email=c("#billing_email").val(),t.phone=c("#billing_phone").val(),(void 0===t.phone||t.phone.length<=0)&&delete t.phone,(void 0===t.email||t.email.length<=0)&&(c("#stripe-payment-data").data("email").length?t.email=c("#stripe-payment-data").data("email"):delete t.email),(void 0===t.name||t.name.length<=0)&&delete t.name,t.address.line1=c("#billing_address_1").val()||wc_stripe_params.billing_address_1,t.address.line2=c("#billing_address_2").val()||wc_stripe_params.billing_address_2,t.address.state=c("#billing_state").val()||wc_stripe_params.billing_state,t.address.city=c("#billing_city").val()||wc_stripe_params.billing_city,t.address.postal_code=c("#billing_postcode").val()||wc_stripe_params.billing_postcode,t.address.country=c("#billing_country").val()||wc_stripe_params.billing_country,{owner:t}},createSource:function(){var e=m.getOwnerDetails();return m.isSepaChosen()?(e.currency=c("#stripe-sepa_debit-payment-data").data("currency"),e.mandate={notification_method:wc_stripe_params.sepa_mandate_notification},e.type="sepa_debit",n.createSource(a,e).then(m.sourceResponse)):n.createSource(t,e).then(m.sourceResponse)},sourceResponse:function(e){if(e.error)return c(document.body).trigger("stripeError",e);m.reset(),m.form.append(c('<input type="hidden" />').addClass("stripe-source").attr("name","stripe_source").val(e.source.id)),c("form#add_payment_method").length&&c(m.form).off("submit",m.form.onSubmit),m.form.submit()},onSubmit:function(){return!m.isStripeChosen()||(!(!m.isStripeSaveCardChosen()&&!m.hasSource())||(!!(m.isBancontactChosen()||m.isGiropayChosen()||m.isIdealChosen()||m.isAlipayChosen()||m.isSofortChosen()||m.isP24Chosen()||m.isEpsChosen()||m.isMultibancoChosen())||(m.block(),m.createSource(),!1)))},onCCFormChange:function(){m.reset()},reset:function(){c(".wc-stripe-error, .stripe-source").remove()},onSepaError:function(e){var r=m.getSelectedPaymentElement().parents("li").eq(0).find(".stripe-source-errors");if(!e.error)return c(r).html("");console.log(e.error.message),c(r).html('<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li /></ul>'),c(r).find("li").text(e.error.message)},onError:function(e,r){var t,n=r.error.message,o=m.getSelectedPaymentElement().closest("li"),i=o.find(".woocommerce-SavedPaymentMethods-tokenInput");if(i.length){var s=i.filter(":checked");t=s.closest(".woocommerce-SavedPaymentMethods-new").length?c("#wc-stripe-cc-form .stripe-source-errors"):s.closest("li").find(".stripe-source-errors")}else t=o.find(".stripe-source-errors");if(m.isSepaChosen()&&"invalid_owner_name"===r.error.code&&wc_stripe_params.hasOwnProperty(r.error.code)){var a='<ul class="woocommerce-error"><li /></ul>';return a.find("li").text(wc_stripe_params[r.error.code]),m.submitError(a)}"email_invalid"===r.error.code?n=wc_stripe_params.email_invalid:"invalid_request_error"!==r.error.type&&"api_connection_error"!==r.error.type&&"api_error"!==r.error.type&&"authentication_error"!==r.error.type&&"rate_limit_error"!==r.error.type||(n=wc_stripe_params.invalid_request_error),"card_error"===r.error.type&&wc_stripe_params.hasOwnProperty(r.error.code)&&(n=wc_stripe_params[r.error.code]),"validation_error"===r.error.type&&wc_stripe_params.hasOwnProperty(r.error.code)&&(n=wc_stripe_params[r.error.code]),m.reset(),c(".woocommerce-NoticeGroup-checkout").remove(),console.log(r.error.message),c(t).html('<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li /></ul>'),c(t).find("li").text(n),c(".wc-stripe-error").length&&c("html, body").animate({scrollTop:c(".wc-stripe-error").offset().top-200},200),m.unblock(),c.unblockUI()},submitError:function(e){c(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message").remove(),m.form.prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'+e+"</div>"),m.form.removeClass("processing").unblock(),m.form.find(".input-text, select, input:checkbox").blur();var r="";c("#add_payment_method").length&&(r=c("#add_payment_method")),c("#order_review").length&&(r=c("#order_review")),c("form.checkout").length&&(r=c("form.checkout")),r.length&&c("html, body").animate({scrollTop:r.offset().top-100},500),c(document.body).trigger("checkout_error"),m.unblock()},onHashChange:function(){var e=window.location.hash.match(/^#?confirm-pi-([^:]+):(.+)$/);if(e&&!(e.length<3)){var r=e[1],t=decodeURIComponent(e[2]);window.location.hash="",m.openIntentModal(r,t)}},maybeConfirmIntent:function(){if(c("#stripe-intent-id").length&&c("#stripe-intent-return").length){var e=c("#stripe-intent-id").val(),r=c("#stripe-intent-return").val();m.openIntentModal(e,r,!0)}},openIntentModal:function(e,r,t){n.handleCardPayment(e).then(function(e){if(e.error)throw e.error;"requires_capture"!==e.paymentIntent.status&&"succeeded"!==e.paymentIntent.status||(window.location=r)}).catch(function(e){if(t)return window.location=r;c(document.body).trigger("stripeError",{error:e}),m.form&&m.form.removeClass("processing"),c.get(r+"&is_ajax")})}};m.init()});
changelog.txt CHANGED
@@ -1,5 +1,16 @@
1
  *** Changelog ***
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 4.2.3 - 2019-07-18 =
4
  * Fix - Ignore "payment failed" webhooks if they come after another payment has already succeeded for that order.
5
  * Fix - Correctly transition an order to "On Hold" if the payment was put under review by Stripe Radar, and back to "Processing" when the review is approved.
1
  *** Changelog ***
2
 
3
+ = 4.2.4 - 2019-09-18 =
4
+ * Fix - Unclear error message when email address not completely filled in.
5
+ * Fix - Add payment request button compatibility with variable subscriptions
6
+ * Tweak - Do not show payment request button for shippable trial subscription products
7
+ * Fix - Do not copy the payment intent id when creating a subscription renewal
8
+ * Fix - Return early from check intent status if no order - props strayobject
9
+ * Fix - Extend webhook time window from 1 to 5 minutes to match Stripe client
10
+ * Update - WooCommerce 3.7 compatibility
11
+ * Update - Apple Pay Domain association file
12
+ * Update - Grandfather pre-SCA subscription renewals for SCA
13
+
14
  = 4.2.3 - 2019-07-18 =
15
  * Fix - Ignore "payment failed" webhooks if they come after another payment has already succeeded for that order.
16
  * Fix - Correctly transition an order to "On Hold" if the payment was put under review by Stripe Radar, and back to "Processing" when the review is approved.
includes/class-wc-gateway-stripe.php CHANGED
@@ -906,6 +906,11 @@ class WC_Gateway_Stripe extends WC_Stripe_Payment_Gateway {
906
  }
907
 
908
  $order = wc_get_order( absint( $order_id ) );
 
 
 
 
 
909
  $this->verify_intent_after_checkout( $order );
910
  }
911
 
906
  }
907
 
908
  $order = wc_get_order( absint( $order_id ) );
909
+
910
+ if ( ! $order ) {
911
+ return;
912
+ }
913
+
914
  $this->verify_intent_after_checkout( $order );
915
  }
916
 
includes/class-wc-stripe-helper.php CHANGED
@@ -223,6 +223,7 @@ class WC_Stripe_Helper {
223
  'processing_error' => __( 'An error occurred while processing the card.', 'woocommerce-gateway-stripe' ),
224
  'invalid_request_error' => __( 'Unable to process this payment, please try again or use alternative method.', 'woocommerce-gateway-stripe' ),
225
  'invalid_sofort_country' => __( 'The billing country is not accepted by SOFORT. Please try another country.', 'woocommerce-gateway-stripe' ),
 
226
  )
227
  );
228
  }
223
  'processing_error' => __( 'An error occurred while processing the card.', 'woocommerce-gateway-stripe' ),
224
  'invalid_request_error' => __( 'Unable to process this payment, please try again or use alternative method.', 'woocommerce-gateway-stripe' ),
225
  'invalid_sofort_country' => __( 'The billing country is not accepted by SOFORT. Please try another country.', 'woocommerce-gateway-stripe' ),
226
+ 'email_invalid' => __( 'Invalid email address, please correct and try again.', 'woocommerce-gateway-stripe' ),
227
  )
228
  );
229
  }
includes/class-wc-stripe-webhook-handler.php CHANGED
@@ -104,7 +104,7 @@ class WC_Stripe_Webhook_Handler extends WC_Stripe_Payment_Gateway {
104
 
105
  // Verify the timestamp.
106
  $timestamp = intval( $matches['timestamp'] );
107
- if ( abs( $timestamp - time() ) > MINUTE_IN_SECONDS ) {
108
  return;
109
  }
110
 
104
 
105
  // Verify the timestamp.
106
  $timestamp = intval( $matches['timestamp'] );
107
+ if ( abs( $timestamp - time() ) > 5 * MINUTE_IN_SECONDS ) {
108
  return;
109
  }
110
 
includes/compat/class-wc-stripe-subs-compat.php CHANGED
@@ -221,10 +221,7 @@ class WC_Stripe_Subs_Compat extends WC_Gateway_Stripe {
221
  $prepared_source->source = '';
222
  }
223
 
224
- $request = $this->generate_payment_request( $renewal_order, $prepared_source );
225
- $request['capture'] = 'true';
226
- $request['amount'] = WC_Stripe_Helper::get_stripe_amount( $amount, $request['currency'] );
227
- $response = WC_Stripe_API::request( $request );
228
 
229
  if ( ! empty( $response->error ) ) {
230
  // We want to retry.
@@ -262,7 +259,8 @@ class WC_Stripe_Subs_Compat extends WC_Gateway_Stripe {
262
 
263
  do_action( 'wc_gateway_stripe_process_payment', $response, $renewal_order );
264
 
265
- $this->process_response( $response, $renewal_order );
 
266
  } catch ( WC_Stripe_Exception $e ) {
267
  WC_Stripe_Logger::log( 'Error: ' . $e->getMessage() );
268
 
@@ -273,6 +271,54 @@ class WC_Stripe_Subs_Compat extends WC_Gateway_Stripe {
273
  }
274
  }
275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  /**
277
  * Updates other subscription sources.
278
  *
@@ -309,6 +355,8 @@ class WC_Stripe_Subs_Compat extends WC_Gateway_Stripe {
309
  delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_source_id' );
310
  // For BW compat will remove in future
311
  delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_card_id' );
 
 
312
  $this->delete_renewal_meta( $resubscribe_order );
313
  }
314
 
@@ -320,6 +368,9 @@ class WC_Stripe_Subs_Compat extends WC_Gateway_Stripe {
320
  WC_Stripe_Helper::delete_stripe_fee( $renewal_order );
321
  WC_Stripe_Helper::delete_stripe_net( $renewal_order );
322
 
 
 
 
323
  return $renewal_order;
324
  }
325
 
221
  $prepared_source->source = '';
222
  }
223
 
224
+ $response = $this->create_and_confirm_intent_for_renewal( $amount, $renewal_order, $prepared_source );
 
 
 
225
 
226
  if ( ! empty( $response->error ) ) {
227
  // We want to retry.
259
 
260
  do_action( 'wc_gateway_stripe_process_payment', $response, $renewal_order );
261
 
262
+
263
+ $this->process_response( end( $response->charges->data ), $renewal_order );
264
  } catch ( WC_Stripe_Exception $e ) {
265
  WC_Stripe_Logger::log( 'Error: ' . $e->getMessage() );
266
 
271
  }
272
  }
273
 
274
+ /**
275
+ * Create and confirm a new PaymentIntent.
276
+ *
277
+ * @param float $amount The amount to charge.
278
+ * @param WC_Order $order The order that is being paid for.
279
+ * @param object $prepared_source The source that is used for the payment.
280
+ * @return object An intent or an error.
281
+ */
282
+ public function create_and_confirm_intent_for_renewal( $amount, $order, $prepared_source ) {
283
+ // The request for a charge contains metadata for the intent.
284
+ $full_request = $this->generate_payment_request( $order, $prepared_source );
285
+
286
+ $request = array(
287
+ 'source' => $prepared_source->source,
288
+ 'amount' => WC_Stripe_Helper::get_stripe_amount( $amount, $full_request['currency'] ),
289
+ 'currency' => strtolower( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->get_order_currency() : $order->get_currency() ),
290
+ 'description' => $full_request['description'],
291
+ 'metadata' => $full_request['metadata'],
292
+ 'payment_method_types' => array(
293
+ 'card',
294
+ ),
295
+ 'off_session' => 'true',
296
+ 'confirm' => 'true',
297
+ 'confirmation_method' => 'automatic',
298
+ );
299
+
300
+ if ( isset( $full_request['statement_descriptor'] ) ) {
301
+ $request['statement_descriptor'] = $full_request['statement_descriptor'];
302
+ }
303
+
304
+ if ( $prepared_source->customer ) {
305
+ $request['customer'] = $prepared_source->customer;
306
+ }
307
+
308
+ $intent = WC_Stripe_API::request( $request, 'payment_intents' );
309
+ if ( ! empty( $intent->error ) ) {
310
+ return $intent;
311
+ }
312
+
313
+ $order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->id : $order->get_id();
314
+ WC_Stripe_Logger::log( "Stripe PaymentIntent $intent->id initiated for order $order_id" );
315
+
316
+ // Save the intent ID to the order.
317
+ $this->save_intent_to_order( $order, $intent );
318
+
319
+ return $intent;
320
+ }
321
+
322
  /**
323
  * Updates other subscription sources.
324
  *
355
  delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_source_id' );
356
  // For BW compat will remove in future
357
  delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_card_id' );
358
+ // delete payment intent ID
359
+ delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_intent_id' );
360
  $this->delete_renewal_meta( $resubscribe_order );
361
  }
362
 
368
  WC_Stripe_Helper::delete_stripe_fee( $renewal_order );
369
  WC_Stripe_Helper::delete_stripe_net( $renewal_order );
370
 
371
+ // delete payment intent ID
372
+ delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $renewal_order->id : $renewal_order->get_id() ), '_stripe_intent_id' );
373
+
374
  return $renewal_order;
375
  }
376
 
includes/payment-methods/class-wc-stripe-payment-request.php CHANGED
@@ -405,6 +405,8 @@ class WC_Stripe_Payment_Request {
405
  'variable',
406
  'variation',
407
  'subscription',
 
 
408
  'booking',
409
  'bundle',
410
  'composite',
@@ -428,6 +430,11 @@ class WC_Stripe_Payment_Request {
428
  return false;
429
  }
430
 
 
 
 
 
 
431
  // Pre Orders compatbility where we don't support charge upon release.
432
  if ( class_exists( 'WC_Pre_Orders_Order' ) && WC_Pre_Orders_Cart::cart_contains_pre_order() && WC_Pre_Orders_Product::product_is_charged_upon_release( WC_Pre_Orders_Cart::get_pre_order_product() ) ) {
433
  return false;
@@ -560,6 +567,11 @@ class WC_Stripe_Payment_Request {
560
  return;
561
  }
562
 
 
 
 
 
 
563
  // Pre Orders charge upon release not supported.
564
  if ( class_exists( 'WC_Pre_Orders_Order' ) && WC_Pre_Orders_Product::product_is_charged_upon_release( $product ) ) {
565
  WC_Stripe_Logger::log( 'Pre Order charge upon release is not supported. ( Payment Request button disabled )' );
@@ -572,7 +584,7 @@ class WC_Stripe_Payment_Request {
572
  }
573
  }
574
  ?>
575
- <div id="wc-stripe-payment-request-wrapper" style="clear:both;padding-top:1.5em;">
576
  <div id="wc-stripe-payment-request-button">
577
  <!-- A Stripe Element will be inserted here. -->
578
  </div>
@@ -614,6 +626,11 @@ class WC_Stripe_Payment_Request {
614
  return;
615
  }
616
 
 
 
 
 
 
617
  // Pre Orders charge upon release not supported.
618
  if ( class_exists( 'WC_Pre_Orders_Order' ) && WC_Pre_Orders_Product::product_is_charged_upon_release( $product ) ) {
619
  WC_Stripe_Logger::log( 'Pre Order charge upon release is not supported. ( Payment Request button disabled )' );
405
  'variable',
406
  'variation',
407
  'subscription',
408
+ 'variable-subscription',
409
+ 'subscription_variation',
410
  'booking',
411
  'bundle',
412
  'composite',
430
  return false;
431
  }
432
 
433
+ // Trial subscriptions with shipping are not supported
434
+ if ( class_exists( 'WC_Subscriptions_Order' ) && WC_Subscriptions_Cart::cart_contains_subscription() && $_product->needs_shipping() && WC_Subscriptions_Product::get_trial_length( $_product ) > 0 ) {
435
+ return false;
436
+ }
437
+
438
  // Pre Orders compatbility where we don't support charge upon release.
439
  if ( class_exists( 'WC_Pre_Orders_Order' ) && WC_Pre_Orders_Cart::cart_contains_pre_order() && WC_Pre_Orders_Product::product_is_charged_upon_release( WC_Pre_Orders_Cart::get_pre_order_product() ) ) {
440
  return false;
567
  return;
568
  }
569
 
570
+ // Trial subscriptions with shipping are not supported
571
+ if ( class_exists( 'WC_Subscriptions_Order' ) && $product->needs_shipping() && WC_Subscriptions_Product::get_trial_length( $product ) > 0 ) {
572
+ return;
573
+ }
574
+
575
  // Pre Orders charge upon release not supported.
576
  if ( class_exists( 'WC_Pre_Orders_Order' ) && WC_Pre_Orders_Product::product_is_charged_upon_release( $product ) ) {
577
  WC_Stripe_Logger::log( 'Pre Order charge upon release is not supported. ( Payment Request button disabled )' );
584
  }
585
  }
586
  ?>
587
+ <div id="wc-stripe-payment-request-wrapper" style="clear:both;padding-top:1.5em;display:none;">
588
  <div id="wc-stripe-payment-request-button">
589
  <!-- A Stripe Element will be inserted here. -->
590
  </div>
626
  return;
627
  }
628
 
629
+ // Trial subscriptions with shipping are not supported
630
+ if ( class_exists( 'WC_Subscriptions_Order' ) && $product->needs_shipping() && WC_Subscriptions_Product::get_trial_length( $product ) > 0 ) {
631
+ return;
632
+ }
633
+
634
  // Pre Orders charge upon release not supported.
635
  if ( class_exists( 'WC_Pre_Orders_Order' ) && WC_Pre_Orders_Product::product_is_charged_upon_release( $product ) ) {
636
  WC_Stripe_Logger::log( 'Pre Order charge upon release is not supported. ( Payment Request button disabled )' );
languages/woocommerce-gateway-stripe.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the WooCommerce Stripe Gateway package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce Stripe Gateway 4.2.3\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-gateway-stripe\n"
8
- "POT-Creation-Date: 2019-07-12 15:21:21+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -56,8 +56,8 @@ msgstr ""
56
 
57
  #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:439
58
  #: includes/class-wc-stripe-order-handler.php:296
59
- #: includes/class-wc-stripe-webhook-handler.php:340
60
- #: includes/class-wc-stripe-webhook-handler.php:392
61
  #. translators: transaction id
62
  msgid "Stripe charge complete (Charge ID: %s)"
63
  msgstr ""
@@ -206,8 +206,8 @@ msgstr ""
206
 
207
  #: includes/admin/class-wc-stripe-privacy.php:41
208
  #: includes/compat/class-wc-stripe-sepa-subs-compat.php:463
209
- #: includes/compat/class-wc-stripe-subs-compat.php:475
210
- #: includes/compat/class-wc-stripe-subs-compat.php:490
211
  msgid "N/A"
212
  msgstr ""
213
 
@@ -853,9 +853,9 @@ msgstr ""
853
 
854
  #: includes/class-wc-gateway-stripe.php:810
855
  #: includes/class-wc-stripe-order-handler.php:162
856
- #: includes/class-wc-stripe-webhook-handler.php:231
857
  #: includes/compat/class-wc-stripe-sepa-subs-compat.php:263
858
- #: includes/compat/class-wc-stripe-subs-compat.php:244
859
  #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:373
860
  msgid ""
861
  "Sorry, we are unable to process your payment at this time. Please retry "
@@ -870,13 +870,13 @@ msgid ""
870
  "done is for you to authorize the payment with your bank."
871
  msgstr ""
872
 
873
- #: includes/class-wc-gateway-stripe.php:1015
874
- #: includes/class-wc-stripe-webhook-handler.php:660
875
  #. translators: 1) The error message that was received from Stripe.
876
  msgid "Stripe SCA authentication failed. Reason: %s"
877
  msgstr ""
878
 
879
- #: includes/class-wc-gateway-stripe.php:1016
880
  msgid "Stripe SCA authentication failed."
881
  msgstr ""
882
 
@@ -990,6 +990,10 @@ msgstr ""
990
  msgid "The billing country is not accepted by SOFORT. Please try another country."
991
  msgstr ""
992
 
 
 
 
 
993
  #: includes/class-wc-stripe-intent-controller.php:58
994
  msgid "CSRF verification failed."
995
  msgstr ""
@@ -1004,7 +1008,7 @@ msgid "Payment verification error: %s"
1004
  msgstr ""
1005
 
1006
  #: includes/class-wc-stripe-order-handler.php:144
1007
- #: includes/class-wc-stripe-webhook-handler.php:212
1008
  #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:353
1009
  msgid "This card is no longer available and has been removed."
1010
  msgstr ""
@@ -1031,7 +1035,7 @@ msgstr ""
1031
  msgid "SEPA IBAN ending in %s"
1032
  msgstr ""
1033
 
1034
- #: includes/class-wc-stripe-webhook-handler.php:289
1035
  #. translators: 1) The URL to the order.
1036
  msgid ""
1037
  "A dispute was created for this order. Response is needed. Please go to your "
@@ -1039,34 +1043,34 @@ msgid ""
1039
  "Dashboard</a> to review this dispute."
1040
  msgstr ""
1041
 
1042
- #: includes/class-wc-stripe-webhook-handler.php:335
1043
  #. translators: partial captured amount
1044
  msgid "This charge was partially captured via Stripe Dashboard in the amount of: %s"
1045
  msgstr ""
1046
 
1047
- #: includes/class-wc-stripe-webhook-handler.php:421
1048
  msgid "This payment failed to clear."
1049
  msgstr ""
1050
 
1051
- #: includes/class-wc-stripe-webhook-handler.php:454
1052
  msgid "This payment has cancelled."
1053
  msgstr ""
1054
 
1055
- #: includes/class-wc-stripe-webhook-handler.php:489
1056
  msgid "Refunded via Stripe Dashboard"
1057
  msgstr ""
1058
 
1059
- #: includes/class-wc-stripe-webhook-handler.php:489
1060
- #: includes/class-wc-stripe-webhook-handler.php:517
1061
  msgid "Pre-Authorization Released via Stripe Dashboard"
1062
  msgstr ""
1063
 
1064
- #: includes/class-wc-stripe-webhook-handler.php:517
1065
  #. translators: 1) dollar amount 2) transaction id 3) refund message
1066
  msgid "Refunded %1$s - Refund ID: %2$s - %3$s"
1067
  msgstr ""
1068
 
1069
- #: includes/class-wc-stripe-webhook-handler.php:539
1070
  #. translators: 1) The URL to the order. 2) The reason type.
1071
  msgid ""
1072
  "A review has been opened for this order. Action is needed. Please go to "
@@ -1074,7 +1078,7 @@ msgid ""
1074
  "Dashboard</a> to review the issue. Reason: (%2$s)"
1075
  msgstr ""
1076
 
1077
- #: includes/class-wc-stripe-webhook-handler.php:563
1078
  #. translators: 1) The reason type.
1079
  msgid "The opened review for this order is now closed. Reason: (%s)"
1080
  msgstr ""
@@ -1101,20 +1105,20 @@ msgid "Customer not found"
1101
  msgstr ""
1102
 
1103
  #: includes/compat/class-wc-stripe-sepa-subs-compat.php:386
1104
- #: includes/compat/class-wc-stripe-subs-compat.php:398
1105
  #. translators: error message
1106
  msgid "A \"Stripe Customer ID\" value is required."
1107
  msgstr ""
1108
 
1109
  #: includes/compat/class-wc-stripe-sepa-subs-compat.php:388
1110
- #: includes/compat/class-wc-stripe-subs-compat.php:400
1111
  msgid ""
1112
  "Invalid customer ID. A valid \"Stripe Customer ID\" must begin with "
1113
  "\"cus_\"."
1114
  msgstr ""
1115
 
1116
  #: includes/compat/class-wc-stripe-sepa-subs-compat.php:397
1117
- #: includes/compat/class-wc-stripe-subs-compat.php:409
1118
  msgid ""
1119
  "Invalid source ID. A valid source \"Stripe Source ID\" must begin with "
1120
  "\"src_\" or \"card_\"."
@@ -1131,7 +1135,7 @@ msgid ""
1131
  "not been charge. Please try with alternative payment method."
1132
  msgstr ""
1133
 
1134
- #: includes/compat/class-wc-stripe-subs-compat.php:490
1135
  #. translators: 1) card brand 2) last 4 digits
1136
  msgid "Via %1$s card ending in %2$s"
1137
  msgstr ""
@@ -1252,56 +1256,56 @@ msgid "Stripe SOFORT"
1252
  msgstr ""
1253
 
1254
  #: includes/payment-methods/class-wc-stripe-payment-request.php:261
1255
- #: includes/payment-methods/class-wc-stripe-payment-request.php:849
1256
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1147
1257
  msgid "Tax"
1258
  msgstr ""
1259
 
1260
  #: includes/payment-methods/class-wc-stripe-payment-request.php:269
1261
- #: includes/payment-methods/class-wc-stripe-payment-request.php:857
1262
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1154
1263
  msgid "Shipping"
1264
  msgstr ""
1265
 
1266
  #: includes/payment-methods/class-wc-stripe-payment-request.php:276
1267
- #: includes/payment-methods/class-wc-stripe-payment-request.php:864
1268
  msgid "Pending"
1269
  msgstr ""
1270
 
1271
- #: includes/payment-methods/class-wc-stripe-payment-request.php:496
1272
  msgid "Sorry, we're not accepting prepaid cards at this time."
1273
  msgstr ""
1274
 
1275
- #: includes/payment-methods/class-wc-stripe-payment-request.php:498
1276
  #. translators: Do not translate the [option] placeholder
1277
  msgid "Unknown shipping option \"[option]\"."
1278
  msgstr ""
1279
 
1280
- #: includes/payment-methods/class-wc-stripe-payment-request.php:629
1281
  msgid "OR"
1282
  msgstr ""
1283
 
1284
- #: includes/payment-methods/class-wc-stripe-payment-request.php:723
1285
- #: includes/payment-methods/class-wc-stripe-payment-request.php:736
1286
  msgid "Unable to find shipping method for address."
1287
  msgstr ""
1288
 
1289
- #: includes/payment-methods/class-wc-stripe-payment-request.php:805
1290
  msgid "Product with the ID (%d) cannot be found."
1291
  msgstr ""
1292
 
1293
- #: includes/payment-methods/class-wc-stripe-payment-request.php:832
1294
  #. translators: 1: product name 2: quantity in stock
1295
  msgid ""
1296
  "You cannot add that amount of \"%1$s\"; to the cart because there is not "
1297
  "enough stock (%2$s remaining)."
1298
  msgstr ""
1299
 
1300
- #: includes/payment-methods/class-wc-stripe-payment-request.php:986
1301
  msgid "Empty cart"
1302
  msgstr ""
1303
 
1304
- #: includes/payment-methods/class-wc-stripe-payment-request.php:1161
1305
  msgid "Discount"
1306
  msgstr ""
1307
 
@@ -1342,4 +1346,4 @@ msgstr ""
1342
 
1343
  #. Author URI of the plugin/theme
1344
  msgid "https://woocommerce.com/"
1345
- msgstr ""
2
  # This file is distributed under the same license as the WooCommerce Stripe Gateway package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce Stripe Gateway 4.2.4\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-gateway-stripe\n"
8
+ "POT-Creation-Date: 2019-09-19 16:36:22+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
56
 
57
  #: includes/abstracts/abstract-wc-stripe-payment-gateway.php:439
58
  #: includes/class-wc-stripe-order-handler.php:296
59
+ #: includes/class-wc-stripe-webhook-handler.php:348
60
+ #: includes/class-wc-stripe-webhook-handler.php:400
61
  #. translators: transaction id
62
  msgid "Stripe charge complete (Charge ID: %s)"
63
  msgstr ""
206
 
207
  #: includes/admin/class-wc-stripe-privacy.php:41
208
  #: includes/compat/class-wc-stripe-sepa-subs-compat.php:463
209
+ #: includes/compat/class-wc-stripe-subs-compat.php:526
210
+ #: includes/compat/class-wc-stripe-subs-compat.php:541
211
  msgid "N/A"
212
  msgstr ""
213
 
853
 
854
  #: includes/class-wc-gateway-stripe.php:810
855
  #: includes/class-wc-stripe-order-handler.php:162
856
+ #: includes/class-wc-stripe-webhook-handler.php:239
857
  #: includes/compat/class-wc-stripe-sepa-subs-compat.php:263
858
+ #: includes/compat/class-wc-stripe-subs-compat.php:241
859
  #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:373
860
  msgid ""
861
  "Sorry, we are unable to process your payment at this time. Please retry "
870
  "done is for you to authorize the payment with your bank."
871
  msgstr ""
872
 
873
+ #: includes/class-wc-gateway-stripe.php:1020
874
+ #: includes/class-wc-stripe-webhook-handler.php:686
875
  #. translators: 1) The error message that was received from Stripe.
876
  msgid "Stripe SCA authentication failed. Reason: %s"
877
  msgstr ""
878
 
879
+ #: includes/class-wc-gateway-stripe.php:1021
880
  msgid "Stripe SCA authentication failed."
881
  msgstr ""
882
 
990
  msgid "The billing country is not accepted by SOFORT. Please try another country."
991
  msgstr ""
992
 
993
+ #: includes/class-wc-stripe-helper.php:226
994
+ msgid "Invalid email address, please correct and try again."
995
+ msgstr ""
996
+
997
  #: includes/class-wc-stripe-intent-controller.php:58
998
  msgid "CSRF verification failed."
999
  msgstr ""
1008
  msgstr ""
1009
 
1010
  #: includes/class-wc-stripe-order-handler.php:144
1011
+ #: includes/class-wc-stripe-webhook-handler.php:220
1012
  #: includes/payment-methods/class-wc-gateway-stripe-sepa.php:353
1013
  msgid "This card is no longer available and has been removed."
1014
  msgstr ""
1035
  msgid "SEPA IBAN ending in %s"
1036
  msgstr ""
1037
 
1038
+ #: includes/class-wc-stripe-webhook-handler.php:297
1039
  #. translators: 1) The URL to the order.
1040
  msgid ""
1041
  "A dispute was created for this order. Response is needed. Please go to your "
1043
  "Dashboard</a> to review this dispute."
1044
  msgstr ""
1045
 
1046
+ #: includes/class-wc-stripe-webhook-handler.php:343
1047
  #. translators: partial captured amount
1048
  msgid "This charge was partially captured via Stripe Dashboard in the amount of: %s"
1049
  msgstr ""
1050
 
1051
+ #: includes/class-wc-stripe-webhook-handler.php:429
1052
  msgid "This payment failed to clear."
1053
  msgstr ""
1054
 
1055
+ #: includes/class-wc-stripe-webhook-handler.php:462
1056
  msgid "This payment has cancelled."
1057
  msgstr ""
1058
 
1059
+ #: includes/class-wc-stripe-webhook-handler.php:497
1060
  msgid "Refunded via Stripe Dashboard"
1061
  msgstr ""
1062
 
1063
+ #: includes/class-wc-stripe-webhook-handler.php:497
1064
+ #: includes/class-wc-stripe-webhook-handler.php:525
1065
  msgid "Pre-Authorization Released via Stripe Dashboard"
1066
  msgstr ""
1067
 
1068
+ #: includes/class-wc-stripe-webhook-handler.php:525
1069
  #. translators: 1) dollar amount 2) transaction id 3) refund message
1070
  msgid "Refunded %1$s - Refund ID: %2$s - %3$s"
1071
  msgstr ""
1072
 
1073
+ #: includes/class-wc-stripe-webhook-handler.php:556
1074
  #. translators: 1) The URL to the order. 2) The reason type.
1075
  msgid ""
1076
  "A review has been opened for this order. Action is needed. Please go to "
1078
  "Dashboard</a> to review the issue. Reason: (%2$s)"
1079
  msgstr ""
1080
 
1081
+ #: includes/class-wc-stripe-webhook-handler.php:589
1082
  #. translators: 1) The reason type.
1083
  msgid "The opened review for this order is now closed. Reason: (%s)"
1084
  msgstr ""
1105
  msgstr ""
1106
 
1107
  #: includes/compat/class-wc-stripe-sepa-subs-compat.php:386
1108
+ #: includes/compat/class-wc-stripe-subs-compat.php:449
1109
  #. translators: error message
1110
  msgid "A \"Stripe Customer ID\" value is required."
1111
  msgstr ""
1112
 
1113
  #: includes/compat/class-wc-stripe-sepa-subs-compat.php:388
1114
+ #: includes/compat/class-wc-stripe-subs-compat.php:451
1115
  msgid ""
1116
  "Invalid customer ID. A valid \"Stripe Customer ID\" must begin with "
1117
  "\"cus_\"."
1118
  msgstr ""
1119
 
1120
  #: includes/compat/class-wc-stripe-sepa-subs-compat.php:397
1121
+ #: includes/compat/class-wc-stripe-subs-compat.php:460
1122
  msgid ""
1123
  "Invalid source ID. A valid source \"Stripe Source ID\" must begin with "
1124
  "\"src_\" or \"card_\"."
1135
  "not been charge. Please try with alternative payment method."
1136
  msgstr ""
1137
 
1138
+ #: includes/compat/class-wc-stripe-subs-compat.php:541
1139
  #. translators: 1) card brand 2) last 4 digits
1140
  msgid "Via %1$s card ending in %2$s"
1141
  msgstr ""
1256
  msgstr ""
1257
 
1258
  #: includes/payment-methods/class-wc-stripe-payment-request.php:261
1259
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:866
1260
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1164
1261
  msgid "Tax"
1262
  msgstr ""
1263
 
1264
  #: includes/payment-methods/class-wc-stripe-payment-request.php:269
1265
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:874
1266
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1171
1267
  msgid "Shipping"
1268
  msgstr ""
1269
 
1270
  #: includes/payment-methods/class-wc-stripe-payment-request.php:276
1271
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:881
1272
  msgid "Pending"
1273
  msgstr ""
1274
 
1275
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:503
1276
  msgid "Sorry, we're not accepting prepaid cards at this time."
1277
  msgstr ""
1278
 
1279
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:505
1280
  #. translators: Do not translate the [option] placeholder
1281
  msgid "Unknown shipping option \"[option]\"."
1282
  msgstr ""
1283
 
1284
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:646
1285
  msgid "OR"
1286
  msgstr ""
1287
 
1288
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:740
1289
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:753
1290
  msgid "Unable to find shipping method for address."
1291
  msgstr ""
1292
 
1293
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:822
1294
  msgid "Product with the ID (%d) cannot be found."
1295
  msgstr ""
1296
 
1297
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:849
1298
  #. translators: 1: product name 2: quantity in stock
1299
  msgid ""
1300
  "You cannot add that amount of \"%1$s\"; to the cart because there is not "
1301
  "enough stock (%2$s remaining)."
1302
  msgstr ""
1303
 
1304
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1003
1305
  msgid "Empty cart"
1306
  msgstr ""
1307
 
1308
+ #: includes/payment-methods/class-wc-stripe-payment-request.php:1178
1309
  msgid "Discount"
1310
  msgstr ""
1311
 
1346
 
1347
  #. Author URI of the plugin/theme
1348
  msgid "https://woocommerce.com/"
1349
+ msgstr ""
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: automattic, royho, akeda, mattyza, bor0, woothemes
3
  Tags: credit card, stripe, apple pay, payment request, google pay, sepa, sofort, bancontact, alipay, giropay, ideal, p24, woocommerce, automattic
4
  Requires at least: 4.4
5
- Tested up to: 5.2.1
6
  Requires PHP: 5.6
7
- Stable tag: 4.2.3
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
  Attributions: thorsten-stripe
@@ -113,11 +113,16 @@ If you get stuck, you can ask for help in the Plugin Forum.
113
 
114
  == Changelog ==
115
 
116
- = 4.2.3 - 2019-07-18 =
117
- * Fix - Ignore "payment failed" webhooks if they come after another payment has already succeeded for that order.
118
- * Fix - Correctly transition an order to "On Hold" if the payment was put under review by Stripe Radar, and back to "Processing" when the review is approved.
119
- * Tweak - Make the publishable key fields be plain text instead of "password".
120
- * Fix - Fix successful retries of 3ds failing.
 
 
 
 
 
121
 
122
  [See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/master/changelog.txt).
123
 
2
  Contributors: automattic, royho, akeda, mattyza, bor0, woothemes
3
  Tags: credit card, stripe, apple pay, payment request, google pay, sepa, sofort, bancontact, alipay, giropay, ideal, p24, woocommerce, automattic
4
  Requires at least: 4.4
5
+ Tested up to: 5.2.2
6
  Requires PHP: 5.6
7
+ Stable tag: 4.2.4
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
  Attributions: thorsten-stripe
113
 
114
  == Changelog ==
115
 
116
+ = 4.2.4 - 2019-09-18 =
117
+ * Fix - Unclear error message when email address not completely filled in.
118
+ * Fix - Add payment request button compatibility with variable subscriptions
119
+ * Tweak - Do not show payment request button for shippable trial subscription products
120
+ * Fix - Do not copy the payment intent id when creating a subscription renewal
121
+ * Fix - Return early from check intent status if no order - props strayobject
122
+ * Fix - Extend webhook time window from 1 to 5 minutes to match Stripe client
123
+ * Update - WooCommerce 3.7 compatibility
124
+ * Update - Apple Pay Domain association file
125
+ * Update - Grandfather pre-SCA subscription renewals for SCA
126
 
127
  [See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/master/changelog.txt).
128
 
woocommerce-gateway-stripe.php CHANGED
@@ -5,11 +5,11 @@
5
  * Description: Take credit card payments on your store using Stripe.
6
  * Author: WooCommerce
7
  * Author URI: https://woocommerce.com/
8
- * Version: 4.2.3
9
  * Requires at least: 4.4
10
- * Tested up to: 5.2.1
11
  * WC requires at least: 2.6
12
- * WC tested up to: 3.6.4
13
  * Text Domain: woocommerce-gateway-stripe
14
  * Domain Path: /languages
15
  *
@@ -46,7 +46,7 @@ function woocommerce_gateway_stripe_init() {
46
  /**
47
  * Required minimums and constants
48
  */
49
- define( 'WC_STRIPE_VERSION', '4.2.3' );
50
  define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
51
  define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
52
  define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
5
  * Description: Take credit card payments on your store using Stripe.
6
  * Author: WooCommerce
7
  * Author URI: https://woocommerce.com/
8
+ * Version: 4.2.4
9
  * Requires at least: 4.4
10
+ * Tested up to: 5.2.2
11
  * WC requires at least: 2.6
12
+ * WC tested up to: 3.7
13
  * Text Domain: woocommerce-gateway-stripe
14
  * Domain Path: /languages
15
  *
46
  /**
47
  * Required minimums and constants
48
  */
49
+ define( 'WC_STRIPE_VERSION', '4.2.4' );
50
  define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
51
  define( 'WC_STRIPE_MIN_WC_VER', '2.6.0' );
52
  define( 'WC_STRIPE_MAIN_FILE', __FILE__ );