Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe - Prefill customer email #510

Open
carlos-mg89 opened this issue Feb 28, 2020 · 1 comment
Open

Stripe - Prefill customer email #510

carlos-mg89 opened this issue Feb 28, 2020 · 1 comment

Comments

@carlos-mg89
Copy link

Hi!

I have the PayumBundle set up with stripe_checkout gateway and users can do one time payments withouts issues. However, I find the customer email field empty in the Stripe checkout form.

I'm filling the payment client email:

$payment->setClientEmail('myuser@email.com');

As well as passing the customerEmail parameter in the details array:

$payment->setDetails([
    'customerEmail' => 'myuser@email.com'
]);

However the email field isn't being completed. I believe the name of the parameter in the details array is the one that matters, or at least this is what I can read here https://stripe.com/docs/payments/checkout/client#prefilling-customer-data

Any ideas about why would not be the details not be sent/processed correctly?

Thanks in advance

@rudyhadoux
Copy link

$session = \Stripe\Checkout\Session::create([
'payment_method_types' => ['card'],
'line_items' => [[
'price_data' => [
'product_data' => [
'name' => $productName,
'metadata' => [
'pro_id' => $productID
]
],
'unit_amount' => $stripeAmount,
'currency' => $currency,
],
'quantity' => 1,
'description' => $productName,
]],
'mode' => 'payment',
'success_url' => STRIPE_SUCCESS_URL.'?session_id={CHECKOUT_SESSION_ID}',
'cancel_url' => STRIPE_CANCEL_URL,
'customer_email' => 'john.doe@codexworld.com'
]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants