#ashoth_code

1 messages ยท Page 1 of 1 (latest)

cinder drumBOT
#

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

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

mystic gustBOT
#

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.

viral smelt
#

Hi tarzan

still siren
#

๐Ÿ‘‹ happy to help

viral smelt
#

i am using this code but throw the error in during payment detection

#

pi_3PAmqCKThIwh3yrW1w4HU5BF

still siren
#

taking a look

viral smelt
#

ok give me the reason above using the code is the right format or not if not give me the right way

still siren
#

you're saying it's failing with insufficient funds but it's not

viral smelt
#

ya that issue occur in our live account this is a developer account
so can you please give a right solution in above code.

still siren
#

can you give me the request ID for the capture that failed?

#

I can't speculate without understanding what happened for that particular request

viral smelt
#

wait will share my request ID

#

pi_3PAnzTKThIwh3yrW1fZnUjWp

still siren
#

there is no capture on this PaymentIntent

#

it is not even confirmed

cinder drumBOT
strong bay
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

viral smelt
#

yes i need some clarification in above the code

strong bay
#

Is there any guide you are following ?

#

Is there a specific use case you're trying to account for?

viral smelt
#

Yes I am following this document
but charge detection is using in ChargeService method so is this correct or not

strong bay
#

but charge detection is using in ChargeService method so is this correct or not
Sorry, I'm not understanding you can you share more details ?

#

According to the payment intent you've shared, you've juste created the payment intent

#

You need to collect a payment method

viral smelt
#

okay wait i will share

#

this is my

pre authorization code:

var options = new PaymentIntentCreateOptions
{
Amount = Convert.ToInt64(Convert.ToDecimal(ProductCartModel.OrderDetailCart.Sum(od => Convert.ToDecimal(od.price) * Convert.ToDecimal(od.quantity))) * 100),
Currency = "usd",
PaymentMethodTypes = new List<string> { "card" },
CaptureMethod = "manual",
PaymentMethod = credit_card_auth_id,
Customer = stripe_customer_token,

};

var service = new PaymentIntentService();
var paymentIntent = service.Create(options);

this is my
payment debit charge code:

var chargeOptions = new ChargeCreateOptions
{
Amount = Convert.ToInt64(Convert.ToDecimal(Ordrdt[0].total_amt_payment) * 100),
Currency = Ordrdt[0].currency_code,
Description = "PackBack Payment Confirmation for Order Id-" + Ordrdt[0].Order_id,
Source = Ordrdt[0].credit_card_auth_id,
ReceiptEmail = Ordrdt[0].email,
Customer = Ordrdt[0].customer,
Metadata = new Dictionary<string, string>
{
{ "OrderId", convertedOrderid },
}
};

var chargeService = new ChargeService();
Charge charge = await chargeService.CreateAsync(chargeOptions);

this format is right or wrong
because we are facing one payment failed issue
so can you give a correct solution for me

strong bay
#

Why you are using Charge Service

#

and not PaymentIntent Service ?

viral smelt
#

because previously we are used in this charge service for payment detection so we are use that, is there any problem..

strong bay
#

The recommended way is to use PaymentIntent and not direct Charge APis

viral smelt
#

okay what will be the impact in charge api

strong bay
#

The charge API is deprecated.

viral smelt
#

I have used this Charge API for the last 2 months. But How some of them are get succeeded even it is deprecated ?

strong bay
#

Deprecated doesn't mean removed. You can still use it and plan to migrate as soon as possible.

viral smelt
#

Okay, we removed the Charge API and switched to the Payment Intent API. However, we've already made some payments using the Charge API. How can we make this transition without affecting previous transactions? That's why I'm asking.

lucid canopy
#

Any old payments won't be impacted assuming they've been successfully processed

viral smelt
#

How is this possible? Our application uses pre-authorization, where transaction amounts are held until orders are processed and amounts are debited. As a result, some transactions are currently pending. How should I handle this situation?

lucid canopy