duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/addons/duncanmcclean/simple-commerce
Other
146 stars 40 forks source link

Empty fields in succesfull order (Shipping & Payment data) #1026

Closed Web10-Joris closed 7 months ago

Web10-Joris commented 7 months ago

Description

When placing an order (database orders enabled) and successfully passing the Mollie test gateway it shows a 'Unknown' status in the Payment field of that order. In the database the 'gateway' column is also 'null'. No other errors are logged in the process of completing the order.

Scherm­afbeelding 2024-03-01 om 11 42 29

And this also happens for the Shipping Method field. That remains empty while there is a shipping method inside the data column of this order.


Scherm­afbeelding 2024-03-01 om 11 42 24



This is the gateway & data column of the database, related to the order of the screenshots:

gateway:

{"use": "mollie", "data": null, "refund": null}

data:

{
   "site":"nl",
   "mollie":{
      "id":"tr_SfLATr4Yr2",
      "checkout_url":"https://www.mollie.com/checkout/select-method/SfLATr4Yr2"
   },
   "status_log":[
      {
         "data":[

         ],
         "status":"placed",
         "timestamp":1709289322
      },
      {
         "data":[

         ],
         "status":"paid",
         "timestamp":1709289322
      },
      {
         "data":[

         ],
         "status":"dispatched",
         "timestamp":1709289782
      },
      {
         "data":{
            "user":2
         },
         "status":"delivered",
         "timestamp":1709289799
      }
   ],
   "shipping_tax":{
      "rate":21,
      "amount":850,
      "price_includes_tax":false
   },
   "shipping_method":"pallet",
   "shipping_company":"TEST"
}

Steps to reproduce

  1. Use database orders
  2. Make sure Mollie can reach the webhook callback URL
  3. Complete and pay a new order (using test api key of Mollie)
  4. Check the order in the CP and see the empty fields.

Environment

Application Name: XXX Laravel Version: 10.46.0 PHP Version: 8.1.5 Composer Version: 2.5.5 Environment: local Debug Mode: ENABLED URL: localhost/ Maintenance Mode: OFF

Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: NOT CACHED

Drivers Broadcasting: log Cache: statamic Database: mysql Logs: stack / daily, flare Mail: smtp Queue: sync Session: file

Simple Commerce Currencies: EUR, EUR, EUR, EUR Gateways: Mollie Repository: Customer: DuncanMcClean\SimpleCommerce\Customers\EloquentCustomerRepository Repository: Order: DuncanMcClean\SimpleCommerce\Orders\EloquentOrderRepository Repository: Product: DuncanMcClean\SimpleCommerce\Products\EntryProductRepository Shipping Methods: Pallet, International Tax Engine: App\SimpleCommerce\CompanyTaxEngine

Statamic Addons: 5 Antlers: runtime Sites: 4 (Nederlands, Duits, Engels, Pools) Stache Watcher: Enabled Static Caching: Disabled Version: 4.51.0 PRO

Statamic Addons aerni/advanced-seo: 2.4.3 duncanmcclean/simple-commerce: 6.0.9 heidkaemper/statamic-toolbar: 1.1.2 statamic-rad-pack/runway: 6.3.0 statamic/collaboration: 0.8.1

github-actions[bot] commented 7 months ago

Released as part of v6.0.10.

github-actions[bot] commented 7 months ago

Released as part of v6.0.10.