|
1 | 1 | /* global wc_stripe_params, Stripe */
|
2 | 2 |
|
3 |
| -import { |
4 |
| - PAYMENT_METHOD_BOLETO, |
5 |
| - PAYMENT_METHOD_OXXO, |
6 |
| - PAYMENT_METHOD_SEPA, |
7 |
| -} from 'wcstripe/stripe-utils/constants'; |
8 |
| - |
9 | 3 | jQuery( function($ ) {
|
10 | 4 | 'use strict';
|
11 | 5 |
|
@@ -544,7 +538,7 @@ jQuery( function($ ) {
|
544 | 538 | if ( wc_stripe_form.isSepaChosen() ) {
|
545 | 539 | extra_details.currency = $( '#stripe-sepa_debit-payment-data' ).data( 'currency' );
|
546 | 540 | extra_details.mandate = { notification_method: wc_stripe_params.sepa_mandate_notification };
|
547 |
| - extra_details.type = PAYMENT_METHOD_SEPA; |
| 541 | + extra_details.type = 'sepa_debit'; |
548 | 542 |
|
549 | 543 | return stripe.createSource( iban, extra_details ).then( wc_stripe_form.sourceResponse );
|
550 | 544 | }
|
@@ -701,7 +695,7 @@ jQuery( function($ ) {
|
701 | 695 | * After the customer closes the modal proceeds with checkout normally
|
702 | 696 | */
|
703 | 697 | handleBoleto: function () {
|
704 |
| - wc_stripe_form.executeCheckout( PAYMENT_METHOD_BOLETO, function ( checkout_response ) { |
| 698 | + wc_stripe_form.executeCheckout( 'boleto', function ( checkout_response ) { |
705 | 699 | stripe.confirmBoletoPayment(
|
706 | 700 | checkout_response.client_secret,
|
707 | 701 | checkout_response.confirm_payment_data
|
@@ -785,7 +779,7 @@ jQuery( function($ ) {
|
785 | 779 | * After the customer closes the modal proceeds with checkout normally
|
786 | 780 | */
|
787 | 781 | handleOxxo: function () {
|
788 |
| - wc_stripe_form.executeCheckout( PAYMENT_METHOD_OXXO, function ( checkout_response ) { |
| 782 | + wc_stripe_form.executeCheckout( 'oxxo', function ( checkout_response ) { |
789 | 783 | stripe.confirmOxxoPayment(
|
790 | 784 | checkout_response.client_secret,
|
791 | 785 | checkout_response.confirm_payment_data
|
|
0 commit comments