#chris-g_code
1 messages ¡ Page 1 of 1 (latest)
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.
- chris-g_code, 21 hours ago, 35 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1258100580899881152
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Stripe.PaymentIntentCreateOptions piopts = new Stripe.PaymentIntentCreateOptions
{
Amount = Convert.ToInt32(pq.Amount * 100),
Currency = pq.CurrencyCode,
PaymentMethodTypes = new List<string> { "card" },
PaymentMethodData = new Stripe.PaymentIntentPaymentMethodDataOptions { Type = "card" },
Confirm = true
};
piopts.AddExtraParam("payment_method_data[card][number]", pq.cardInfo.AccountNumber);
piopts.AddExtraParam("payment_method_data[card][exp_month]", pq.cardInfo.ExpireMonth);
piopts.AddExtraParam("payment_method_data[card][exp_year]", pq.cardInfo.ExpireYear);
piopts.AddExtraParam("payment_method_data[card][cvc]", pq.cardInfo.CVV);
need to know where to map the following:
//card.AddressCity = pq.billingInfo.City;
//card.AddressCountry = pq.billingInfo.CountryCode;
//card.AddressLine1 = pq.billingInfo.Address1;
//card.AddressLine2 = pq.billingInfo.Address2;
//card.AddressState = pq.billingInfo.StateCode;
//card.AddressZip = pq.billingInfo.PostCode;
//card.Name = pq.cardInfo.CardholderName;
Hello again! You specify that info under payment_method_details.billing_address on the Payment Intent: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_data-billing_details
moto example doesn't use that object though
it uses PaymentIntentCreateOptions
(to get the credit card number in)
or can I just use Stripe.CardCreateOptions().AddExtraParam("[number]") to put in the number?
Keep in mind I'm working from the example code at https://docs.stripe.com/payments/payment-intents/moto
Not sure what you mean... this is inside PaymentIntentCreateOptions.
the page you sent me is using the PaymentIntent object
if you can mark up the code above to add in that info that would help
I can't write your code for you. I'm not sure I understand where the disconnect is. You need to set things like name and address inside payment_method_details.billing_address on the Payment Intent you're creating. You do that by specifying that information in PaymentIntentCreateOptions which is what the MOTO page is telling you to use.
those parameters are not available
Can you explain in very specific detail what specific piece you're getting stuck on?
What do you mean by "not available"?
can you tell me where to put that code?
Visual Studio doesn't have any kind of billing parameter when I type where I think you want me to type
but I'm not sure what you're asking me todo
Stripe.PaymentIntentCreateOptions piopts = new Stripe.PaymentIntentCreateOptions
{
Amount = Convert.ToInt32(pq.Amount * 100),
Currency = pq.CurrencyCode,
PaymentMethodTypes = new List<string> { "card" },
PaymentMethodData = new Stripe.PaymentIntentPaymentMethodDataOptions { Type = "card" },
Confirm = true,
TYPE WHAT HERE? <-----
};
piopts.AddExtraParam("payment_method_data[card][number]", pq.cardInfo.AccountNumber);
piopts.AddExtraParam("payment_method_data[card][exp_month]", pq.cardInfo.ExpireMonth);
piopts.AddExtraParam("payment_method_data[card][exp_year]", pq.cardInfo.ExpireYear);
piopts.AddExtraParam("payment_method_data[card][cvc]", pq.cardInfo.CVV);
where do I type what?
I don't know why this is so complicated
Okay, so for example you have options.AddExtraParam("payment_method_data[card][cvc]", "242"); right? You would do something like options.AddExtraParam("payment_method_data[billing_details][name]", "Some Name"); for example.
why isn't that just part of the object's properties? it's not a custom or hidden field.
I thought I only had to use AddExtraParam for number and cvc.
I don't know, I would have expected it to be in PaymentIntentCreateOptions.
is there someone you can escalate this to?
I swear this can't be this complicated, I've integrated with three other payment gateways with no problem.
PaymentIntentPaymentMethodDataBillingDetailsOptions
this is the first payment gateway I've worked with that didn't just have credit card number and cvc as properties
We do have them as properties in the API, but they're not recommended, and we don't have them in the .NET SDK the way you're expecting.
ok I'll look through that.