- Issue created by @arno2mars
Hi again,
Just to inform you that after a bit of research, I have found an incredibly easy way to achieve this by simply adding the two lines in bold in /src/PluginForm/CommerceStripeCheckoutCheckoutForm.php:
try { if (class_exists('\Stripe\Stripe')) { // Set your Stripe API keys \Stripe\Stripe::setApiKey($secret_key); $success_redirect_url = Url::fromRoute('commerce_stripe_checkout.payment_success', ['stsess' => $stsess], ['absolute' => true])->toString(); $cancel_redirect_url = Url::fromRoute('commerce_stripe_checkout.payment_cancel', ['stsess' => $stsess], ['absolute' => true])->toString(); <strong> $email = $order->mail->value;</strong> // Create a new checkout session $session = \Stripe\Checkout\Session::create([ <strong>'customer_email' => $email,</strong> 'payment_method_types' => ['card'], 'line_items' => $line_items_data, 'mode' => 'payment', 'success_url' => $success_redirect_url, 'cancel_url' => $cancel_redirect_url, ]);
Hope it helps!
- Assigned to sujan shrestha
- Status changed to Needs review
over 1 year ago 6:22am 18 July 2023 - 🇳🇵Nepal sujan shrestha Nepal🇳🇵, Kathmandu
Hi @Arno2Mars,
Thanks for the Feature request.
I have added the 'Pass customer email to stripe' checkbox option to the configuration. If this checkbox is checked, the customer email will be passed to stripe during checkout and if the checkbox is not checked on the configuration, the user can enter a different email address on the stripe payment. Thanks a lot!
Is it possible to do the same with the shipping address?- 🇳🇵Nepal sujan shrestha Nepal🇳🇵, Kathmandu
Hi @Arno2Mars,
I'm also planning for the billing and shipping address.
That's great!
By the way I have tested version 1.0.2 and it works perfectly well!
Thanks again- 🇬🇧United Kingdom joehuggans Harrogate, UK
I've opened up an issue ticket here 📌 Ability to collect billing address Active for adding the functionality to collect a billing address