Payment Ok But Cscart Says "important Transaction Was Canceled By The Customer"

Everything is in the title…



The payment process is OK but once the customer returns from paybox to cscart he returns to the secure checkout page and a yellow message appears on the top right of the browser “important : transaction cancelled by customer”.



I don't understand that



Maybe there's az trouble with the "callbaéck url' from the paybox system ?



What should be the callback url ?



Thanks for your help



Leo



EDIT



MY HTTP CALLBACK URL



http://www.MYSHOP.com/index.php?dispatch=payment_notification.result&payment=paybox



is the syntax correct ???

Good day,



Callback URL is correct. Do you see any PayBox response on the right side of the Order details page in the admin panel?

you mean in the grey “status” windows ? in this area (and for each successful order), I see transaction ID (9 numbers), also payment processor response : 135067 (for example), ORDER STATUS “proceed”

everything seems OK in this area.

If you use default paybox payment method, you should see NumAuto: for accepted orders and Response code: for declined ones.

I don't see these in admin panel of cscart. But of course in the pay box admin panel, I see a specific code if the transaction fails.



The pay box module is working fine. The trouble occurs after the payment process, instead of the “thank you for your order” page, the customer returns to the 'payment method choice" page

[quote name='leofromfrance' timestamp='1407851506' post='189335']

I don't see these in admin panel of cscart. But of course in the pay box admin panel, I see a specific code if the transaction fails.



The pay box module is working fine. The trouble occurs after the payment process, instead of the “thank you for your order” page, the customer returns to the 'payment method choice" page

[/quote]



If you do not see these parameters, it means the store does not receive any information from PayBox. Is your store-front opened now?

yes it is.



I send you the url witgh private message



Thanks for all



Leo

Im getting the same problem with PAYU - https://github.com/payu-india/PayU-Integration-Kit-Cs-Cart/blob/master/PayU/payments/PayU.php. I have modified whatever possible to make it work with version 4.1.5 namely [color=#008080][font=Consolas,]$processor_data[/font][/color][color=#333333][font=Consolas,][[/font][/color][color=#DD1144][font=Consolas,]'params'[/font][/color][color=#333333][font=Consolas,]][[/font][/color][color=#DD1144][font=Consolas,]'account'[/font][/color][color=#333333][font=Consolas,]] to [/font][/color][color=#008080][font=Consolas,]$processor_data[/font][/color][color=#333333][font=Consolas,][[/font][/color][color=#DD1144][font=Consolas,]'processor_params'[/font][/color][color=#333333][font=Consolas,]][[/font][/color][color=#DD1144][font=Consolas,]'account'[/font][/color][color=#333333][font=Consolas,]] and so on…[/font][/color]



Everything looks fine and on success - im passing the required params also…



fn_finish_payment($_REQUEST['order_id'], $pp_response);

fn_order_placement_routines('route',$_REQUEST['order_id']);



Transaction was canceled by the customer



even in the success loop. Kindly help.

[quote name='rafialikhan' timestamp='1411073956' post='192486']

Im getting the same problem with PAYU - [url=“https://github.com/payu-india/PayU-Integration-Kit-Cs-Cart/blob/master/PayU/payments/PayU.php.”]https://github.com/p...ments/PayU.php.[/url] I have modified whatever possible to make it work with version 4.1.5 namely [color=#008080][font=Consolas,]$processor_data[/font][/color][color=#333333][font=Consolas,][[/font][/color][color=#DD1144][font=Consolas,]'params'[/font][/color][color=#333333][font=Consolas,]][[/font][/color][color=#DD1144][font=Consolas,]'account'[/font][/color][color=#333333][font=Consolas,]] to [/font][/color][color=#008080][font=Consolas,]$processor_data[/font][/color][color=#333333][font=Consolas,][[/font][/color][color=#DD1144][font=Consolas,]'processor_params'[/font][/color][color=#333333][font=Consolas,]][[/font][/color][color=#DD1144][font=Consolas,]'account'[/font][/color][color=#333333][font=Consolas,]] and so on…[/font][/color]



Everything looks fine and on success - im passing the required params also…



fn_finish_payment($_REQUEST['order_id'], $pp_response);

fn_order_placement_routines('route',$_REQUEST['order_id']);



Transaction was canceled by the customer



even in the success loop. Kindly help.

[/quote]



Before calling fn_finish_payment, try to set $pp_response['order_status'] to P and check the result. If the order status will be Processed, the issue is in the PayU script.

[quote name='eComLabs' timestamp='1411113951' post='192506']

Before calling fn_finish_payment, try to set $pp_response['order_status'] to P and check the result. If the order status will be Processed, the issue is in the PayU script.

[/quote]



Thanks for looking into this issue, i checked that and its setting to P. I agree the issue is with PayU script but they claim it was compatible with the earlier version of CSCART and not the 4.1.5. So help needed, else i would have to spend a significant amount of time understanding the whole cart functions to solve it.



[color=#000000]Array ( [order_status] => P [reason_text] => Accepted [transaction_id] => 18 [customer_email] => XXX@xxx.in [client_id] => 1055026021742621 [/color]



[color=#000000]What i dont understand is if the fn_finish_payment and fn_order_placement methods have been updated in version 4.1.5. Since when i look up fn.cart.php - i see the functions having different parameters.[/color]



function fn_finish_payment($order_id, $pp_response, $force_notification = array())

function fn_order_placement_routines($action = '', $order_id = 0, $force_notification = array(), $clear_cart = true, $area = AREA)



So should i change the parameters that i need to pass to it to get it to work?



I actually checked the other payment integration scripts and none of them have modified the fn_finish_payment or fn_order_payment_routines params…though i dont have payment gateways to test those.

Just one more query, in the fn_finish_payment - there is a valid id call - which checks the db for the order id and type='S' - this is not being set and hence it never goes into the finish payment function.



function fn_finish_payment($order_id, $pp_response, $force_notification = array())

{

// Change order status

$valid_id = db_get_field(“SELECT order_id FROM ?:order_data WHERE order_id = ?i [color=#ff0000]AND type = 'S'[/color]”, $order_id);



if (!empty($valid_id)) {

db_query(“DELETE FROM ?:order_data WHERE order_id = ?i [color=#ff0000]AND type = 'S'[/color]”, $order_id);



fn_update_order_payment_info($order_id, $pp_response);



if ($pp_response['order_status'] == 'N' && !empty($_SESSION['cart']['placement_action']) && $_SESSION['cart']['placement_action'] == 'repay') {

$pp_response['order_status'] = 'I';

}



fn_set_hook('finish_payment', $order_id, $pp_response, $force_notification);



fn_change_order_status($order_id, $pp_response['order_status'], '', $force_notification);

}

}



What is this type='S', can i remove it?

[quote name='rafialikhan' timestamp='1411131886' post='192520']

[color=#000000][font=arial, verdana, tahoma, sans-serif]What i dont understand is if the fn_finish_payment and fn_order_placement methods have been updated in version 4.1.5. Since when i look up fn.cart.php - i see the functions having different parameters.[/font][/color]

[/quote]



We can recommend you to check script of another payment method and use it as example.


[quote name='rafialikhan' timestamp='1411131886' post='192520']

Just one more query, in the fn_finish_payment - there is a valid id call - which checks the db for the order id and type='S' - this is not being set and hence it never goes into the finish payment function.

[/quote]



You can find it in the fn_start_payment function