#d365-developer_error

1 messages ¡ Page 1 of 1 (latest)

boreal schoonerBOT
#

👋 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/1295441259816681564

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

slim python
#

Hi,

rich topaz
#

Hello, can you tell me more about what specifically you are trying to do with google and apple pay as well as what is going wrong?

slim python
#

When we are trying to implement google pay and apple pay we are getting error, payment methods google pay and apple pay not supported for on behalf of.

rich topaz
#

Can you send me the snippet of code that is getting that error?

#

Also can you copy paste the exact error message that you are getting? That can help me look up exactly what is going on.

slim python
#

body = new Dictionary<string, string>
{
{"amount", cctransinfo.Amount},
{"currency", cctransinfo.CurrencyCode},
{"capture_method", "automatic"},
{"description", cctransinfo.InvoiceNo},
{"off_session","false"},
{"transfer_data[destination]",cctransinfo.StripeAccount},
{"on_behalf_of",cctransinfo.StripeAccount},
{"metadata[ConnectedAccount]",cctransinfo.StripeAccount},
{"metadata[OrgId]",cctransinfo.OrgId},
};

#

body.Add("payment_method_types[0]", "card");
body.Add("payment_method_types[1]", "us_bank_account");
body.Add("payment_method_types[2]", "google_pay");
body.Add("payment_method_types[3]", "apple_pay");
body.Add("payment_method_options[us_bank_account][verification_method]", "instant");

#

{"Error":"The provided payment method types (["google_pay", "apple_pay"]) do not support on_behalf_of."}

rich topaz
#

Ah, it looks like we should improve that error message. google_pay and apple_pay aren't payment method types in Stripe. They fall under the card umbrella. If you replace those lines with just body.Add("payment_method_types[2]", "card"); they should start showing up

slim python
#

we tried using card as well.

#

we are not able to get those elements in checkout page.

#

only card and us bank account is displaying.

rich topaz
slim python
#

let me check. Thanks.

rich topaz
#

Right now I am just curious if the buttons show up for you when you load the page. Basically this issue usually comes down to:

  1. A missing piece of setup for apple/google pay on your site. The main thing to do there is making sure to register your website as a payment method domain https://docs.stripe.com/payments/payment-methods/pmd-registration
  2. Your Apple/Google pay wallet is not set up properly on the machine. A quick way to test that is to look at the 4242.io page, if Apple or Google pay show up on that page, then your wallet is set up properly.