#ocardenas
1 messages · Page 1 of 1 (latest)
hi! what do you mean exactly by adding to it? is there more context you can share?
yes of course
I'm integrating the stripe with my app
and I'm follow this tutorial
and I create this $stripe->paymentIntents->create
for show the form
now I would like to add the name of the person who makes the payment
is this posible?
got it. In that integration if you'd like to capture the user's name and email address, you should add your own HTML inputs for that into your overall page, and then you can pass those values into billingDetails when confirming the PaymentIntent.
https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details
great
so the request should be like this
stripe.confirmPayment({
elements,
billing_details { 'name' : 'Name', 'lastname' : 'Lastname' },
confirmParams: {
// Return URL where the customer should be redirected after the PaymentIntent is confirmed.
return_url: 'https://example.com',
},
})
??
it's just name:"name lastname" , it's not two fields
and no, it's more like
stripe.confirmPayment({
elements,
confirmParams: {
payment_method_data:{billing_details: { 'name' : 'Name' }},
// Return URL where the customer should be redirected after the PaymentIntent is confirmed.
return_url: 'https://example.com/',
},
})
great!