Convert saved payment methods token to a string (https://github.com/woocommerce/woocommerce-blocks/pull/3627)

* Allow integers in payment_data values

* Revert "Allow integers in payment_data values"

This reverts commit b7f2ca4a5b696091afe796f47e84f584a0b27d9e.

* Enforce payment tokens to be strings
This commit is contained in:
Albert Juhé Lluveras 2021-01-05 10:51:23 +01:00 committed by GitHub
parent 9a537fdab5
commit de2796ca4e
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ const getCcOrEcheckPaymentMethodOption = (
setActivePaymentMethod( method.gateway ); setActivePaymentMethod( method.gateway );
setPaymentStatus().success( { setPaymentStatus().success( {
payment_method: method.gateway, payment_method: method.gateway,
[ savedTokenKey ]: token, [ savedTokenKey ]: token + '',
isSavedToken: true, isSavedToken: true,
} ); } );
}, },
@ -81,7 +81,7 @@ const getDefaultPaymentMethodOptions = (
setActivePaymentMethod( method.gateway ); setActivePaymentMethod( method.gateway );
setPaymentStatus().success( { setPaymentStatus().success( {
payment_method: method.gateway, payment_method: method.gateway,
[ savedTokenKey ]: token, [ savedTokenKey ]: token + '',
isSavedToken: true, isSavedToken: true,
} ); } );
}, },