Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hello, @fungzhao

    Based on our research, when a payment action is declined by Alipay_CN, the order remains stuck in that state until the payment expires. Resolving this issue may require additional time to investigate. In such cases, you may need to place a new order or wait 15 minutes for the payment to expire. Alternatively, you can customize the expiration time by modifying the code below in class-wc-gateway-antom-common.php.

    	// order expire time.
    $order_expiry_time = get_option( 'woocommerce_hold_stock_minutes' );
    if ( ! $order_expiry_time ) {
    // if the order expiry time is not set, set it to 15 minutes.
    $order_expiry_time = 15;
    }
    $order_expiry_time = $order_expiry_time * 60;

    Regarding the ID problem, let me confirm.

    Normally, when an order fails due to risk control, your plugin system should receive a failure notification, and the order status would be set to FAILED. At this point, you should be able to initiate another payment.

    Are you experiencing a situation where an order with a failed ALIPAY_CN payment remains stuck in the on-hold status, unable to transition to FAILED, and also cannot proceed with another payment?

    If this is the issue, I believe that since the order status is now set to pending_payment after placing the order, you should be able to go to the User’s MyAcccount Orders page and retry the payment from there.

    Hi @fungzhao
    Congratulations on successfully launching sales in the China region! We’ve noticed that you’ve already processed several payments. Regarding the blocked ALIPAY_CN payment, it was due to ALIPAY_CN detecting suspicious behavior from the payer, which led to the transaction being stopped. Similar situations may arise in the future. However, this is unrelated to which payment plugin is used; it is a decision made by ALIPAY_CN’s risk control mechanism.

    Regarding the issue you mentioned in point 2, we previously initiated a discussion in the community, and the conclusion was that both on-hold and pending payment statuses are suitable for payments in progress. You can refer to the discussion here:
    https://github.com/woocommerce/woocommerce/discussions/50514#discussioncomment-10589501.

    However, since WooCommerce sends a successful order email by default when an order is set to on-hold, you can customize the on-hold email template to address this issue. That said, this could involve additional work.

    To address this, we released an updated version of our plugin (v1.0.3), which keeps the order in the pending payment status during the payment process, thereby avoiding email triggers.

    That being said, there are pros and cons. In the pending payment status, users can reopen the order to make a payment. If a customer selects our payment method but later switches to another payment plugin, it may result in duplicate payments. However, we believe this scenario is highly unlikely.

    Thank you again for your support of our plugin. We hope your product achieves great success in the market!

    skyman2024

    (@skyman2024)

    Hello @fungzhao ,

    We have released a new version of the plugin, version 1.0.2.

    In this version, once you initiate a payment, the system will redirect to the QR CODE page, set the order status to “on-hold,” and clear the shopping cart. If the user remains inactive on the QR page for an extended period (by default, 15 minutes, or the inventory expiration time if you’ve set one), or if the payment fails, your WordPress system will mark the order as “FAIL.”

    In production mode, you can test whether the notification is configured correctly by initiating a payment and waiting 15 minutes to see if the order is marked as “FAIL.”

    We greatly appreciate your patience while using the plugin and your assistance in troubleshooting issues. Once again, thank you very much for your understanding.

    If you have any further questions, we will respond promptly. We hope your product sells well in the Chinese market!

    skyman2024

    (@skyman2024)

    @fungzhao
    Users of Alipay CN cannot make payments using the Alipay HK payment method, as the two are not interchangeable. This may require some custom handling on your end.
    I hope you have a speedy recovery.

    skyman2024

    (@skyman2024)

    Hello, @fungzhao

    The current logic of our plugin is as follows: When a user creates an order and has not yet made a payment, the order remains in the “pending payment” status, and the contents of the cart will not be cleared. Only when a successful payment notification is received will the order be set to either “PROCESSING” or “COMPLETED,” at which point the contents of the cart will be cleared.

    I also need to confirm some additional information. When you see that the contents of the cart have not been cleared, is the order still in the “pending payment” status? If the order has been set to “PROCESSING” or “COMPLETED” and the cart contents are still not cleared, this is a clear abnormal scenario that requires further inspection and testing.

    Regarding your second question, ALIPAY_HK is the most popular payment method in Hong Kong. In other regions of China, the widely used payment method is ALIPAY_CN. If you wish to provide payment options for users in regions outside of Hong Kong, you need to enable the ALIPAY_CN payment method in our plugin and log in to our merchant portal’s payment methods page to confirm that the ALIPAY_CN payment method has been activated (activation does not require any submission of materials; it will be automatically activated once you complete your KYC certification, though it may take several weeks for ALIPAY_CN to conduct the review).

    If you intend to sell to users in China, we recommend enabling both ALIPAY_CN and ALIPAY_HK payment methods in the plugin.

    Additionally, regarding the notification issue you encountered during plugin debugging, testing successful payment notifications in a production environment can be quite challenging. I am discussing with the product manager the possibility of setting the order to “on-hold” after the payment initiation. After the payment expires (usually defaulting to 15 minutes after initiation), we will send a failure notification and set the WooCommerce order status to “FAIL.” You can test whether production orders are set to “FAIL” in a timely manner to verify if the notifications are configured correctly. This may allow us to release a new version of the plugin, which you can download as needed.

    Thank you!

    skyman2024

    (@skyman2024)

    @fungzhao
    We suspect that the issue is related to not being able to correctly retrieve headers on the Nginx server., which leads to the failure of notification signature verification. We have adjusted the plugin code and conducted tests on the Nginx server. It works properly for signature verification on our configured Nginx server.

    We have released the fixed version as version 1.0.1. We hope you can try it out at your convenience.

    Thank you very much for your patience and understanding. We will follow up promptly with any questions you may have.

    skyman2024

    (@skyman2024)

    Hello Fenga
    Could you please tell me what server your WordPress site is deployed on? Is it Apache, Nginx, or another server?

    skyman2024

    (@skyman2024)

    The public key need to be configured is Antom Public Key.
    We have identified that the issue may be related to the handling of certain request headers when receiving notifications. Along with the previous issue, we will work on locating the problem and releasing a fix as soon as possible. Thank you for your patience and support.

    skyman2024

    (@skyman2024)

    Hello Fenga,

    The reason you received the “order_is_closed” response is that the payment order associated with this order has already been closed on our side, and a notification was sent to your website. It seems that your WordPress system did not correctly process the notification, which caused the WordPress payment plugin to believe that the payment order is still open. Due to idempotency, this triggered the request error.

    You now need to check the following:

    1. Ensure that the clientId configured in your system is correct and is not replaced or altered during the request and notification handling process.
    2. Clear the checkout and generate a new order number to initiate a new payment.

    Thank you.

    • This reply was modified 5 months ago by skyman2024.
    skyman2024

    (@skyman2024)

    Additionally, would you mind letting me know the PHP version and WordPress version you are using? This will help us replicate the issue. Thank you very much!

    skyman2024

    (@skyman2024)

    Hello,

    We sincerely apologize for any inconvenience our plugin code has caused. We will locate the issue and fix it as soon as possible.

    In the meantime, to help you quickly test the payment process, I recommend temporarily removing the code $payment_method_model->set_extend_info( $extend_info ); from line 448 in antom-payments/includes/gateways/class-wc-gateway-common.php. After doing so, please proceed with your testing. This modification will not affect transactions initiated in either production or testing mode.

    Thank you very much for your feedback and support

Viewing 12 replies - 1 through 12 (of 12 total)