#Bogdan

1 messages ยท Page 1 of 1 (latest)

tribal gullBOT
vernal juniper
#

Hey there, we don't really know anything about OpenCart specifically, questions about that should go to the developers/community

#

If you have specific Stripe objects with unexpected behaviour you can share those and perhaps I can offer some insight to point you in the right direction

rough copper
#

i think is from stripe the problem

#

as the order was paid a few hours later, stripe did not sent the intent back

#

that's what i am thinking

#

but maybe is not correct

vernal juniper
rough copper
#

As you can see, the client started chackout at a time and finished 2h later

#

but thee sistem did not sent the payment details for the order back to the shop

#

if the client is doing the order and payment on spot, it sends, but if the order is 1-2h later , does not

#

is liek webhook is not called

vernal juniper
#

Can you share the checkout session ID? It's entirely possible a session could be created and not completed for some time, depending on how the customer accesses the URL and their behaviour on the page

rough copper
#

pi_3Mv5DELo4cteVB1N14vDnqFo

#

i think i got the issue

#

the webhook is looking in the session for order_id

#

but the session may be empty already

#

so i need to get the details of the order back from the stripe information

#

is there any way that the order id is stored there?

vernal juniper
rough copper
#

or is just in the info i do send?

#

is there a way i can seend also the order_id to the info's sent to stripe and stripe just to reply back with it?

#

like here?

vernal juniper
#

What order id do you mean? I don't see any metadata or client_reference_id usage on that session

vernal juniper
rough copper
#

client_reference_id is the client id

#

in metadata , can i put like order_id?

#

i see it used in the code sent to Stripe but i don't see it in metadata

#

Here for example:

vernal juniper
#

Yep, you can put any string key/value pairs you like in metadata

rough copper
#

in the bottom linkl, metadata exists

#

in the top one, does not

vernal juniper
#

That snippet looks like metadata getting added to a payment intent, not a checkout session

rough copper
#

in POST /v1/checkout/sessions

#

is sent

vernal juniper
#

Which might be a different part of your integration

rough copper
#

here:
/v1/payment_pages/cs_live_a1NHQ0EXmnTclG6WGJUwutOnfTTJ591n9Lhjlhx9DWNwIEUArNsIiAo4Ra/confirm
does not exist

vernal juniper
#

Perhaps, but the call is to \Stripe\PaymentIntent::create

rough copper
#

i am trying to find a way to fix what the developer did :))
Because clients are calling me 2-3 days after the paid order and i don't see the order in the shop

#

so i am trying to fix that orders paid 2-3h after the client ended the session on site, to stil lsend me the order update

vernal juniper
#

It appears that the customer is not completing the page for over 2h

#

are you saying this does not align with customer reports?

rough copper
#

So

#

let's say u go on my website and order a product, go to stripe checkout but you do not finish the order

#

you need to leave the house

#

and u remeber in 3h and finish it

tribal gullBOT
rough copper
#

the stripe page is still open, and you pay

#

but my eshop does not get your order id, as the session is already ended on my eshop after 3h

#

and there is my issue, i can't capture the session order id after 3h and in stripe you don't see it anymore as is sent in session and not in payment_pages

west mountain
#

Hi there ๐Ÿ‘‹ taking over, as my colleague needs to step away

Give me a few minutes to get caught up.

rough copper
#

thanks for the help

west mountain
#

As far as I know, in the Customer wouldn't be able to complete the session, since it's expired. It should error out, right?

rough copper
#

but session is expired on our website

#

as he already opened stripe website for payments, the payment is ok

#

just the info we get is not correct

west mountain
#

What do you mean "not correct"?

rough copper
#

i don't get back the order id that i sent in metadata

#

it shows empty

#

correct?

#

so we send:
"metadata": {
"firstname": "Janina",
"email": "janinaharsan@yahoo.com",
"order_id": "7826",
"lastname": "Harsan"
},

#

and the metadata is empty

west mountain
#

You set metadata on the Checkout Session object. What object are you looking to have metadata set on instead?

rough copper
#

i am sending there

#

but after why does the payment appear on this one:

west mountain
#

What do you mean? What does that have to do with metadata?

rough copper
#

So, in my client details i have this

#

one is creating the info, the one above is sending the payment info, correct?

west mountain
#

I still don't understand. A Checkout Session accepts payment information and then creates a payment

rough copper
#

yes, than why does the metadata not appear on the above info?

#

if is sent in Checkout Session?

west mountain
#

Ahhh, because you set it on the Payment Intent. That's what payment_intent_data does (sorry for the confusion)

rough copper
#

order info is present

#

but does not return it to my webhook in the store .. why?

west mountain
#

Because by default webhooks don't automatically send all available object info. You would need to get the Payment Intent from the Checkout Session object or the Customer object in order to get metadata from the Payment Intent. If you want to set metadata on the Checkout Session itself instead, then you need to use this: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-metadata