Created a new Gateway having a a problem

it seem mostly everything is correct.

the client is sent to the gateway host pays. then when he comes back

i get both yellow warning :Transaction was canceled by the customera

and a green warning that the order was successful.

i am using fn_change_order_status and change it to P and all other order status and then us fn_order_placement_routines

fn_change_order_status($_REQUEST['Order_Id'], $pp_response['order_status'], '', true);

fn_order_placement_routines($_REQUEST['Order_Id'], true);

But no matter what i do i get that yellow message. and green.

if more code is needed please let me know i will post it here.

Thanks in advanced

I need to know the same thing… as i am facing same problem… please someone answer to this…

Ok so i read more into the actual function.

Its seems the function in charge for the yellow notification is fn_order_placement_routines … for some reason

this function is being called twice … one time straight when the client is back from the gateway and a second time when i call it…

i dont know what i am doing wrong or how does this function get N as a status …

Any help would really be helpful.