mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
add vault option, add logic for not rendering buttons when subscription but no vaulting enabled
This commit is contained in:
parent
e67a94f931
commit
158db47134
3 changed files with 130 additions and 49 deletions
|
@ -52,8 +52,12 @@ class CreditCardRenderer {
|
|||
|
||||
if (formValid) {
|
||||
|
||||
const vault = document.querySelector(wrapper + ' .ppcp-credit-card-vault') ?
|
||||
document.querySelector(wrapper + ' .ppcp-credit-card-vault').checked : false;
|
||||
|
||||
hostedFields.submit({
|
||||
contingencies: ['3D_SECURE']
|
||||
contingencies: ['3D_SECURE'],
|
||||
vault
|
||||
}).then((payload) => {
|
||||
payload.orderID = payload.orderId;
|
||||
return contextConfig.onApprove(payload);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue