#hassan-shahzad_code

1 messages ยท Page 1 of 1 (latest)

twilit slateBOT
#

๐Ÿ‘‹ 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/1441353083979563050

๐Ÿ“ 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.

plush blaze
#

๐Ÿ‘‹ Happy to help

topaz flume
#

req_sgJ878ugSruiCB

plush blaze
#

Thanks for sharing, checking...

plush blaze
#

Why? Are you trying to just collect the PaymentMethod without charging the customer ?

topaz flume
#

no actually the amount is not 0. i created aoymentIntent on th bakcend and then use it on forntend for doing payment

plush blaze
#

No that's what your backend did sent. It sent 0$ as amount you need to fix that

plush blaze
topaz flume
#

ok, thank you

#

no wait, the request never reach there, it is not showing in log

#

the id was of yesterday not today

plush blaze
#

Can you try again now and share back the generated request ?

topaz flume
#

i try but still nothing in log but the paymentIntentId:"pi_3SVqghJinHQ71v5x1Aaw8S6p"

plush blaze
#

Can you share the code you are using for expanding

#

For that PaymentIntent I'm seeing a generated_card under the charge's payment_method_details pm_1SVqhNJinHQ71v5xvOLP7w7y

#

Ah I think the issue here is that you are trying to expand 4 levels

#

Can you try make the request on the Charge object and not the PaymentIntent?

topaz flume
plush blaze
#

Can you share just where are you doing the expand for faster response ?

#

Ok no worries,

#

var paymentIntent = await piService.GetAsync(StripeCompleteSubscription.PaymentIntentId, new PaymentIntentGetOptions
{
Expand = new List<string>
{
"latest_charge.payment_method_details.card_present.generated_card"
}
}, requestOptions: requestOptions);
You need to update this

#

by Doing it for the charge and not the PaymentIntent

#

and change your expand to just payment_method_details.card_present.generated_card

topaz flume
#

like this var charge = await chargeService.GetAsync(
paymentIntent.LatestChargeId,
new ChargeGetOptions
{
Expand = new List<string>
{
"payment_method_details.card_present"
}
},
requestOptions
);

    var generatedCard = charge?.PaymentMethodDetails?.CardPresent?.GeneratedCard;

    if (generatedCard == null)
    {
        return Ok(new ApiResultMessage
        {
            Area = cControllerArea,
            IsOk = false,
            ErrorDescription = "Impossibile recuperare GeneratedCard dal Charge."
        });
    }
twilit slateBOT
plush blaze
#

Yes something like that (you can add .generated_card at the end too)