#artdudejoe

1 messages ยท Page 1 of 1 (latest)

grizzled monolithBOT
desert marlin
smoky furnace
#

Nope. That article is way before what I am doing.

#

I am trying to pay with a card captured from a reader. Paying once with the card present and then again later when it is not.

#

If I set the payment_method_types to 'card_present' (it won't work without this) using it later does not.

desert marlin
#

When trying to charge a card (at a later date) that was captured from a reader, you should use payment_method_types: card when creating the off-session PaymentIntent

smoky furnace
#

Ok, so the error message reference to payment_method_data is really about payment_method_types and redeclaring that.

#

BTW: that did not work.

#

I am trying to figure out what "You may only use this PaymentMethod type by providing it via payment_method_data on a new PaymentIntent." means.

desert marlin
#

Can you share the request ID associated with that error? It should look like req_...

smoky furnace
#

Yeah. Let me dig for it

#

Not finding it in the dashboard

#

Here it is req_9JVmBI8dfLv8Yz

desert marlin
#

Thanks! I see the PaymentMethod you're trying to use was indeed collected as part of a PaymentIntent that used setup_future_usage: "off_session"

smoky furnace
#

Yep. That's what I was told to do to make this possible.

#

Any idea why it's not working?

tardy rivet
smoky furnace
#

Sure. Give me sec

#

Intent prior to reader: req_AFNIH3rSiSu3dj
handoff paymentIntent to reader: req_AorEwBpOxEMJyu
confirmation of PaymentIntent where I got the paymentMethod ID: req_PjVQfxjFPyg4Ac

tardy rivet
#

No sorry. The issue I think we are hitting is that you list both card and card_present payment methods as options. In the code snippet for saving cards for future use they only list card. I suspect that may be the problem here.

smoky furnace
#

Yeah. The original PaymentIntent I must set it to card_present but the next usage is card.

#

The error message indicates something about the payment_method_data

tardy rivet
#

You cannot re-use a payment method that is set to card_present AFAIK.

#

At least not on a Payment Intent

smoky furnace
#

SO, I cannot capture a payment (via paymentIntent then the reader) and THEN save the resulting paymentMethodID from that intent and use it for card not present transactions.

#

?

tardy rivet
#

Hold on, gimme a sec to repro

smoky furnace
#

K

tardy rivet
#

Perfect timing to have to install a system update ๐Ÿ˜…

smoky furnace
#

Dang!

tardy rivet
#

Alright so I created a PM using setup_future_usage:'off_session' but with both ['card', 'card_present']. The resulting PM has a type of card_present

#

I'm going to try to charge it off-session now

smoky furnace
#

cool

#

Question: did you use a reader to process the payment?

tardy rivet
#

The initial payment that created the Payment Method, yes

#

but not the second one where we attempt to charge the existing payment method

smoky furnace
#

Yes.

tardy rivet
smoky furnace
#

Yes. That is what I am retrieving. Turns out it is the same value as $stripe->payment_method though.

#

I think

#

Okay, No it is NOT. Let me test again.

#

Well, golly gee wiz. It WORK!

#

Thank you @tardy rivet