Pending Order Logging Solution
April 17, 2025 · AI Conversations
I have heard many times in this theard that pending orders not stored
I think we can make a log file/or a custom table in which we can store request data in one single column like content $_POST with no validation applied before the code start inserting to pending order table. This way if insertion fail atleast we have a log file to check for order details.
Correct above sentence to share with client
—
Regarding the issue of pending orders not being found, I’ve noticed multiple mentions in this thread that pending orders are not always stored. I suggest creating a log file or a custom database table to capture the raw request data (e.g., the full `$_POST` content) before any validation or order insertion takes place. This way, even if the insertion into the pending order table fails, we’ll still have a complete log to help trace and recover the order details.
—
Let me know if you'd like a more technical or simplified version.
So I've also gone through payment api and found that we can also add server side response url in relax-payment.php in to the HostedPaymentData section like below.This may make sure It will always found response url
—
I’ve reviewed the code and found that the response URL is being set in `relax-custom.js`. However, in some cases, it might not work due to JavaScript being blocked or issues like slow internet connections.
To address this, I also checked the payment API and found that we can define the response URL on the server side within `relax-payment.php`, specifically inside the `HostedPaymentData` section. Adding it here can help ensure that the response URL is always available, regardless of client-side issues.
—
Let me know if you want this reworded for a more technical or less technical audience.