#chris-g_code

1 messages ¡ Page 1 of 1 (latest)

modern finchBOT
autumn barnBOT
#

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.

modern finchBOT
#

👋 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.

oak oriole
#
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;
meager pier
oak oriole
#

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?

meager pier
#

Not sure what you mean... this is inside PaymentIntentCreateOptions.

oak oriole
#

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

meager pier
#

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.

oak oriole
#

those parameters are not available

meager pier
#

Can you explain in very specific detail what specific piece you're getting stuck on?

#

What do you mean by "not available"?

oak oriole
#

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

meager pier
#

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.

oak oriole
#

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.

meager pier
#

I don't know, I would have expected it to be in PaymentIntentCreateOptions.

oak oriole
#

is there someone you can escalate this to?

oak oriole
#

I swear this can't be this complicated, I've integrated with three other payment gateways with no problem.

meager pier
#

PaymentIntentPaymentMethodDataBillingDetailsOptions

oak oriole
#

this is the first payment gateway I've worked with that didn't just have credit card number and cvc as properties

meager pier
#

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.

oak oriole
#

ok I'll look through that.