Order created prior to credit card processing

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
jafo66
Posts: 68
Joined: 06 Mar 2024, 04:42

Order created prior to credit card processing

Post by jafo66 » 22 Sep 2024, 23:40

Issue:

We are adding items to the basket, and proceeding through the check out process. An order is created even though the user never completes the credit card process.

Detailed steps:
  1. Add item to basket
  2. Select Checkout
  3. Pick payment (currently using Omnipay/Authorize.NET API)
  4. Click check box for accepting terms / conditions
  5. Click "Buy Now"
  6. See payment screen (credit card details) - at this point, an order without any status has been created. As a user, I can click out of the process or select a different payment process.
Every time a user selects a different payment method, a new order is created even though the order was never processed.

My questions:
  • Should this be happening, and if so can you explain why?
  • I depend on an order being created to know what to show / not show to the user, what should I be filtering to only see "processed" orders OR how do we prevent this from happening?
  • How does an admin know whether that order is "valid"?

Code: Select all

                "php": "^8.1",
                "academe/omnipay-authorizenetapi": " ~3.0",
                "aimeos-extensions/cybn-management": "^0.1.0",
                "aimeos/ai-admin-jqadm": "^2024.04.x-dev",
                "aimeos/ai-payments": "^2024.04",
                "aimeos/aimeos-laravel": "~2024.04",
                "aimeoscom/ai-customergroups": "^2024.04",
                "guzzlehttp/guzzle": "^7.2",
                "inertiajs/inertia-laravel": "^0.6.8",
                "laravel/framework": "^10.10",
                "laravel/jetstream": "^4.3",
                "laravel/sanctum": "^3.3",
                "laravel/tinker": "^2.8",
                "league/omnipay": "^3",
                "omnipay/authorizenet": "^3.3",
                "omnipay/paypal": "^3.0",
                "tightenco/ziggy": "^2.0"
Thanks!

User avatar
aimeos
Administrator
Posts: 8355
Joined: 01 Jan 1970, 00:00

Re: Order created prior to credit card processing

Post by aimeos » 24 Sep 2024, 09:22

This is intentional because you need an unique order ID for the payment gateway (unique each time you send a payment request to the payment gateway). Unfinished orders without payment have a payment status of -1 (unfinished).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

jafo66
Posts: 68
Joined: 06 Mar 2024, 04:42

Re: Order created prior to credit card processing

Post by jafo66 » 07 Dec 2024, 21:04

Is there a job or way to remove the "unfinished" orders after a period of time?

User avatar
aimeos
Administrator
Posts: 8355
Joined: 01 Jan 1970, 00:00

Re: Order created prior to credit card processing

Post by aimeos » 08 Dec 2024, 11:21

Yes, the "order/cleanup/unfinished" job controller:
https://aimeos.org/docs/latest/laravel/ ... once-a-day
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply