#hendr1x

1 messages ยท Page 1 of 1 (latest)

vernal peakBOT
ashen mantle
#

๐Ÿ‘‹ happy to help

alpine hound
#

That is the guide I am using

#

I finished all steps already and got the response already

#

just writing this last part and I will be done ๐Ÿ™‚

ashen mantle
#

you can either ask the customer for another payment method and go back to step 4

#

or you can simply restart the process for the start

alpine hound
#

can you tell the commands?

ashen mantle
#

what do you mean?

alpine hound
#

I assume the first is to cancel the current order?

#

I don't think you understood...this is after a payment was already confirmPayment()

#

on the return_url

#

I want to do a final check of inventory levels

ashen mantle
#

when you say this test fails, you mean if you don't have any more products in your inventory?

alpine hound
#

yes. If an order was processed during the redirect to stripe

ashen mantle
#

ok then you need to cancel the Payment Intent

#

and let the customer know the payment wasn't processed due to insufficient quantities of the item they ordered

alpine hound
#

ok...so basically start from scratch right...after cancel payment intent. Then generate new payment method, then new payment intent

#

Finally confirm again

ashen mantle
#

you don't need a new PI

#

if you don't have enough quantity

alpine hound
#

My hope would be that they would adjust the quantity and still place the new order that I can fulfill.

vernal peakBOT
acoustic prairie
#

Hi! I'm taking over my colleague. Please, give me a moment to catch up.

alpine hound
#

why does that happen?

#

Did I make him mad?

acoustic prairie
#

Haha, no!

alpine hound
#

ok...well its not worth wasting you time trying to get up to speed

#

I'll just try and figure it out

#

it just was the weirdest thing to say before just disappearing

#

and he did the exact same thing to be me last week

#

pretty sure he doesn't like me

acoustic prairie
#

Sometimes we need to take a break, and other colleagues are taking over the conversation.
No worries, I will try to catch up quickly

alpine hound
#

please done'

#

don't

#

have a good day

acoustic prairie
acoustic prairie
# alpine hound My hope would be that they would adjust the quantity and still place the new ord...

That's correct, you don't need to create a new PI. If you update the amount on the PI, the status will go back to requires_payment_method and you can repeat the process.
To be honest, I think an even easier solution would be to use manual capture, meaning you put a hold on the funds, and after you check your inventory you capture the funds youself: https://stripe.com/docs/payments/place-a-hold-on-a-payment-method

#

Anyway. Please, let me know if you have any other questions.

alpine hound
#

I need to cancel a paymentIntent. I'm just learning about this but I'm 99% sure my status is not in the "allowed" status list. What do I do when a payment has been successfully captured and needs to be canceled?

#

thank you for your prior response as well

acoustic prairie
alpine hound
#

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, in rare cases, processing.

acoustic prairie
alpine hound
#

ok. how do I refund it?

alpine hound
#

Ok..so if I do a refund I assume I have to start from scratch if I want to take another payment correct?

acoustic prairie
#

Yes.
I would say, if you can automatically check the inventory, refunding is too much movement.
That's why I suggested placing a hold on the Payment Method, and capture when you are sure have enough in stock. This way no money is moved before you are sure you can proceed with the transaction.

#

Another way I see, is reserving the selected items in your database when the customer goes to checkout. However, I understand this won't work if you need to manually verify the inventory.

alpine hound
#

I'm interested in using the manual capture method...however I am using paymentMethods

#

do you have any idea compability?

#

It is 100% coded

#

I just am handling the confirmPayment() redirect

#

return_url

#

I want to do a final inventory check before completing process

#

just in case any orders processed while in stripe redirect

acoustic prairie
alpine hound
#

its already coded...I'm not recoding everything

acoustic prairie
alpine hound
#

Its not the 2 steps that cause the issue

acoustic prairie
#

But with manual capture you are in control of making the last call.

alpine hound
#

it is present in 1 step

acoustic prairie
alpine hound
#

There are other requirements on this project you are not aware of

#

I can not get rid of 2 step checkout

#

what are my options? Is it only to do a refund?

acoustic prairie
alpine hound
#

Ok...great. I would like that very much

#

I'm sorry to be a bother.

acoustic prairie
#

No worries, that's why we're here ๐Ÿ˜‰

alpine hound
#

I am creating my paymentIntent server side. Do you know when confirmating/validation occurs? Is this going to be an issue communicating issues with customers?

acoustic prairie
#

What do you mean by "communicating issues with customers"?

alpine hound
#

If it fails validation

acoustic prairie
#

By "validation" you mean realising you don't have enough inventory?

alpine hound
#

No...I mean stuff on your side of things

acoustic prairie
#

Payment Elements will take care of that.

alpine hound
#

Ok

#

Last question I think...I see capture_method = manual DOC says " (Not all payment methods support this.)"

#

how do I handle this?

acoustic prairie
#

What PM types are you planning to use?

alpine hound
#

That's not my decision. Sorry I cant provide an answer

acoustic prairie
alpine hound
#

Ok. I think that is limitation I can not allow. So are we back to only being able to do a refund?

acoustic prairie
#

I think at this point you would be better off building a reservation mechanism in your app. As soon as the customers goes to checkout you can lock a specific number of items for a few minutes to give them time to complete the transaction.
Refunds is bad user experience.

alpine hound
#

Thank you for the suggestion. It's still a race condition. It's all caused by the redirect_url required by your system.

#

I'm just trying to handle that as best as I can.

#

Maybe that's not right actually. I get what your suggesting now

#

I also get that I should avoid refunds at all costs.

#

Ok. Let me explore your idea more. I really appreciate your time and creativity

acoustic prairie
acoustic prairie