payfort / woocommerce-payfort

MIT License
10 stars 22 forks source link

checkout now working for 3d secure #17

Closed mmanan closed 5 years ago

mmanan commented 5 years ago

I have installed the plugin to my wooCommerce site, but facing issue when click on checkout it shows an error "There are some issues with the items in your cart. Please go back to the cart page and resolve these issues before checking out." I checked the order list, its showing pending status, then i checked payfort logs and i found the payfort response was with "3d Secure requeted" response_message. I wonder how i can handle the 3d Secure response for integration type "MerchantPage 2.0". because i am expecting plugin will handle this by its own.

Kindly guide me what i need to do in wooCommerce to handle response for integration type "MerchantPage 2.0".

Thanks

DeyaZ88 commented 5 years ago

Please contact integration@payfort.com to assist you

mmanan commented 5 years ago

I have emailed already, but waiting for response. will close the issue here once resolve it and will share the solution whatever i got.

mmanan commented 5 years ago

The issue resolved finally, let me share the solution. Issue: In this plugin payment.php file has a function callApi($postData, $gatewayUrl) which is sending request to payfort to notify and parsing response to json $array_result = json_decode($response, true);

while the response was coming in xml format so it was returning null to $array_result.

Solution: To resolve the above issue in Payfort account settings, under Account Setup > Technical Settings enable Json for response type.

Suggestion: Plugin should be configured with this settings as well, if an account settings is with XML response type, then response should be parse accordingly.