I am trying to save a credit/debit card in my WordPress site with WooCommerce. I need to save this information because I rent products, then if the product is not returned by the specified day, I want to create a charge as a penalization. How can I save the token of this card? I'm using this plugin (WooCommerce Stripe Payment Gateway).
Asked
Active
Viewed 1,076 times
2
-
In your extension settings you should be able to enable the "Saved Cards" option to retain the user's card --- https://docs.woocommerce.com/document/stripe/#section-2 – duck Feb 11 '19 at 22:06
-
I've tried, but enables the user to save his payment information. If he don't check that option, the token is not saved. – Erik Camacho Feb 11 '19 at 22:19
-
3I haven't done this personally, but it looks like WooCommerce includes a filter `add_filter( 'wc_stripe_force_save_source', '__return_true' );` that you can use to force save a Customer, https://remicorson.com/force-customer-creation-in-stripe-with-woocommerce/ – duck Feb 11 '19 at 22:43
-
Hi!, Thank you very much @duck, wc_stripe_force_save_source works like a charm, but now I'm searching where the token was saved, do you know where could it be? – Erik Camacho Feb 11 '19 at 23:51
-
I've found it, I was in a table name woocommerce_payment_tokens LOL, thank you very much! – Erik Camacho Feb 12 '19 at 00:16