First time posting to the forum. Forgive me if I fall astray or if I’m miscategorized.
I’m having a difficult time customizing GF & GF Stripe Add On to allow ONLY card data to be captured on a client’s site. The previous dev did some mumbo jumbo and it’s charging everybody $1 and on top of that he had all of the forms as Subscriptions. So on top of charging my clients’ customers they’re also being adding to automatic subscription payments for that $1.
I spent the day talking to Stripe and they offered this page but had no advice to offer on GF.
Has anybody ever integrated the PHP snippet into GF?
https://stripe.com/docs/saving-cards Can we add this to an HTML Block in GF?
// Set your secret key: remember to switch to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
\Stripe\Stripe::setApiKey('sk_test_dDh0MpMVuG1XBAyQIVoRSX6I');
// Create a Customer:
$customer = \Stripe\Customer::create([
'source' => 'tok_mastercard',
'email' => 'paying.user@example.com',
]);
// Charge the Customer instead of the card:
$charge = \Stripe\Charge::create([
'amount' => 1000,
'currency' => 'usd',
'customer' => $customer->id,
]);
// YOUR CODE: Save the customer ID and other info in a database for later.
// When it's time to charge the customer again, retrieve the customer ID.
$charge = \Stripe\Charge::create([
'amount' => 1500, // $15.00 this time
'currency' => 'usd',
'customer' => $customer_id, // Previously stored, then retrieved
]);
Is there an easier way to simply capture the customer’s name and card data without charging them anything? My client wants to come back in later and charge them for their total.
Is there an easier process maybe? Like invoicing?
Thanks in advance.