Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Stripe not receiving OrderID  (Read 3099 times)

Offline RCodiaDavid

  • Newbie
  • *
  • Posts: 23
  • Karma: +5/-0
    • View Profile
Stripe not receiving OrderID
« on: December 21, 2021, 10:31:40 AM »
Hi,

We recently updated to 1.3.0 and then got the Stripe issue of it not capturing payments. So we updated default_stripe to 1.0.5 which helped with the capture issue.

Since then, however, we are no longer receiving OrderID's in Stripe.

Previously the description would say "Shop Name Order #xxxx - Customer Name"
but now just says "Guest Customer: Customer Name" or "Customer ID: xxxx" without any reference to the OrderID.

Could you please help as it's causing a few issues for us.

Many thanks

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Stripe not receiving OrderID
« Reply #1 on: December 22, 2021, 03:07:05 AM »
Hi,

We recently updated to 1.3.0 and then got the Stripe issue of it not capturing payments. So we updated default_stripe to 1.0.5 which helped with the capture issue.

Since then, however, we are no longer receiving OrderID's in Stripe.

Previously the description would say "Shop Name Order #xxxx - Customer Name"
but now just says "Guest Customer: Customer Name" or "Customer ID: xxxx" without any reference to the OrderID.

Could you please help as it's causing a few issues for us.

Many thanks

hi.
Did you see requests from your cart to stripe API in the logs of  "Developers" section ?
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline RCodiaDavid

  • Newbie
  • *
  • Posts: 23
  • Karma: +5/-0
    • View Profile
Re: Stripe not receiving OrderID
« Reply #2 on: December 22, 2021, 06:44:19 AM »
Hi,

Thanks for the tip. I've not really used Stripe at all before but after gaining access and checking their logs it appears that everything is coming through fine.

It's just the way the info is displayed in Balances/Payouts/Transactions description area now doesn't include the OrderID.
Previously all the descriptions were the same format, (shop name, order id, customer name), now it just has the customer name. This is needed for ease of doing the balance reports.

Is this due to us updating Abantecart and the Stripe module or is it something Stripe themselves have changed? How is this description line populated?

Many thanks for your time.

(Edit)
I notice in the logs that the orderID appears in the "statement_descriptor" but "description" it is set null.
On the Stripe API example of the payout object, the statement_descriptor is null but description is filled in.
Is this relevant? Also where in Abantecart is this info set?

Cheers
« Last Edit: December 22, 2021, 07:53:35 AM by RCodiaDavid »

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Stripe not receiving OrderID
« Reply #3 on: December 23, 2021, 06:10:59 AM »
Hi,

Thanks for the tip. I've not really used Stripe at all before but after gaining access and checking their logs it appears that everything is coming through fine.

It's just the way the info is displayed in Balances/Payouts/Transactions description area now doesn't include the OrderID.
Previously all the descriptions were the same format, (shop name, order id, customer name), now it just has the customer name. This is needed for ease of doing the balance reports.

Is this due to us updating Abantecart and the Stripe module or is it something Stripe themselves have changed? How is this description line populated?

Many thanks for your time.

(Edit)
I notice in the logs that the orderID appears in the "statement_descriptor" but "description" it is set null.
On the Stripe API example of the payout object, the statement_descriptor is null but description is filled in.
Is this relevant? Also where in Abantecart is this info set?

Cheers

https://github.com/abantecart/abantecart-src/blob/master/public_html/extensions/default_stripe/storefront/controller/responses/extension/default_stripe.php#L153

If you will be improve a code please send us your modifications (you can do this via github pull request.. or post here)

Let's make a code better together;-)
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline RCodiaDavid

  • Newbie
  • *
  • Posts: 23
  • Karma: +5/-0
    • View Profile
Re: Stripe not receiving OrderID
« Reply #4 on: December 23, 2021, 08:59:52 AM »
Hi Abolabo and thanks for that.

Having a close look at the current default_stripe.php and logs from before and after the upgrade is does seem that populating the 'description' field may be what's needed.

Only thing now is I'm not sure where the 'description' field was actually populated from in the previous version of default_stripe.php.
(edit: I found a line now that matches the old format in default_stripe/storefront/model/extension)

I'll be unable to test now until the new year but as soon as I do I will provide an update.

Many thanks and have a good Christmas/new year.


« Last Edit: December 23, 2021, 09:07:53 AM by RCodiaDavid »

Offline RCodiaDavid

  • Newbie
  • *
  • Posts: 23
  • Karma: +5/-0
    • View Profile
Re: Stripe not receiving OrderID
« Reply #5 on: January 19, 2022, 09:01:50 AM »
Hi again,

Thanks for the help, that was indeed the right file to adjust.

For anyone who might find it useful, the file can be found here:

yourstore/extensions/default_stripe/storefront/controller/responses/extension/default_stripe.php

Line 153 of the is for 'description' so here you can put whatever identifier you want to appear in Stripe console and as the reference in the email that customers receive from Stripe after a purchase.
By default it is blank but this is what we changed it to on ours:

'description'         => 'OurShopName Order #' . $order_info['order_id'],

Hope this helps someone.


Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5791
  • Karma: +274/-2
    • View Profile
Re: Stripe not receiving OrderID
« Reply #6 on: January 20, 2022, 12:53:07 AM »
Thank you, RCodiaDavid

Offline Rdw

  • Newbie
  • *
  • Posts: 6
  • Karma: +2/-0
    • View Profile
Re: Stripe not receiving OrderID
« Reply #7 on: January 27, 2022, 04:11:43 AM »
With regards to the below

yourstore/extensions/default_stripe/storefront/controller/responses/extension/default_stripe.php

Line 153 of the is for 'description' so here you can put whatever identifier you want to appear in Stripe console and as the reference in the email that customers receive from Stripe after a purchase.


I updated our store and stripe reported an error on the number of characters which the field can have entered.

For information the maximum is 22 characters which includes spaces.


 

Powered by SMFPacks Social Login Mod