#wagamumma_best-practices

1 messages ยท Page 1 of 1 (latest)

vocal locustBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1347178940804104253

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

fringe shadow
#

๐Ÿ‘‹ happy to help

#

I'm not sure to be honest, but I'm double checking for you

late citrus
#

ok thank you appreciate it

#

can I also ask an unrelated question, we're using the "stripe elements" integration, in the dashboard they'd like it to display the customers name, which seems to be blank in all transactions except if using apple pay? Can you tell me how we'd always put the customer's name into this to make it easier for them to find orders etc?

fringe shadow
#

so to answer your first question by default we only allow synchronous payments on Paypal

#

would you mind pasting the PaymentIntent ID pi_xxx for one of your Paypal payments?

late citrus
#

py_3Qzd3fIDAO7vvncv0ISfpxM7

#

also this isn't just with paypal, payments by card don't display the name either

fringe shadow
#

I think you're not creating a customer or not filling the billingDetails

#

I just need to look at the payment to understand your integration

late citrus
#

pm_1QzcUhIDAO7vvncvQWiJr0WZ

#

ok thats a card one too if it helps, thanks

#

like i say its just the elements method we use so we're not creating customers or anything but assumed somehow we could just pass the name they use for billing/shipping address on the website maybe?

fringe shadow
#

yes so you're not really creating a Customer for these PaymentIntents

#

so you need to fill in the billingDetails when you submit the payment

#

the billing_details.name is empty

late citrus
#

ok I see, is there an easy way to do this whatever payment method they use then?

fringe shadow
#

for ApplePay we fill these automatically for you

#

if you're using the PaymentElement

late citrus
#

so would that go in here?

#

// Create a PaymentIntent with amount and currency
$paymentIntent = $stripe->paymentIntents->create([
'amount' => get_cart_total()*100,
'currency' => 'gbp',
'automatic_payment_methods' => [
'enabled' => true,
],
]);

fringe shadow
#

no

#

in your frontend code

late citrus
#

isn't that all served from stripes server though I'm not sure how i can edit that except through the dashboard? sorry

fringe shadow
#

it's through your frontend code

#

when you call stripe.confrimPayment in your js code

late citrus
#

OK so i found that now thanks, how do i add just a name in here or does it need full billing details,

fringe shadow
#

yes within the confirmParams

#

you pass paymentMethodData: { billingDetails: {name: "xyz"}}

late citrus
#

so that should work?

#

probably needs a comma at the end i guess

fringe shadow
#

yes

#

please try it and let me know

late citrus
#

ok brilliant i will try that now

#

it doesn't seem to like that

#

tried card and paypal and it says this

#

that's the exact code including comma at end of the first line now

fringe shadow
#

what's the error?

late citrus
#

"message": "Received unknown parameter: paymentMethodData. Did you mean payment_method_data?"

fringe shadow
#

oh sorry

late citrus
#

thats in the dashboard the website justr said unknown error

fringe shadow
#

yes you're totally right

late citrus
#

ok i'll try updating that

fringe shadow
#

payment_method_data.billing_details

late citrus
#

so this?

#

that seems to be working thanks so much!

fringe shadow
#

sure let me know if you need any more help