2

basically my script so far send values to the gateway then get redirected to CS cart .. in that page i grab the values returned and manipulate them.

i use fn finish and fn change order status to finish the order but no matter what i do i get a 404 page not found . i've tried redirecting to the order page but its creates a problem.

Here is the code i use when returning from gateway.

$StaTus_message = "<br>Thank you for shopping with us. Your credit card has been charged and your transaction is successful. We will be shipping your order to you soon.";
$pp_response['customer_email'] = $_REQUEST['billing_cust_email'];   
$pp_response['client_id'] = $_REQUEST['billing_cust_name'];
$pp_response['order_status'] = 'C';
$pp_response['reason_text'] = $StaTus_message;
fn_finish_payment($_REQUEST['Order_Id'], $pp_response);
fn_change_order_status($_REQUEST['Order_Id'], $pp_response['order_status']);

I know this is not a popular subject but i thought I'll give it a go.

Also I've being searching everywhere for documentation both at CS-cart's forum and the internet and couldn't find much.

Thanks in advanced.

Ashwini Chaudhary
  • 244,495
  • 58
  • 464
  • 504
Neta Meta
  • 4,001
  • 9
  • 42
  • 67
  • I've tested some more and followed their functions /hooks some more.. seems fn_order_placement_routines(); was needed however i still have a problem with the notifications – Neta Meta Aug 17 '12 at 07:13

1 Answers1

5

Okay. So, the solution to that was exiting the script after the script sent the client to the gate way, and then upon re-enter using fn_change_order_status - to whatever you need, and then using fn_order_placement_routines to actually finalize the order and send email to client/merchant.

Hope that help people out there as I spent nearly 4 days to try and understand that.

Ashwini Chaudhary
  • 244,495
  • 58
  • 464
  • 504
Neta Meta
  • 4,001
  • 9
  • 42
  • 67