Hello,
I have created a custom payment method using the Leasing API. Everything works fine, except the buyer and the administrator do not receive notifications about the completed order. I’ve read a lot of advice why it might not work, I’ve tried everything, but the problem remains.
In my_custom_payment.php
if (defined(‘PAYMENT_NOTIFICATION’)) {
if ($mode == ‘return_url’ && !empty($_REQUEST[‘order_id’])) {
//my custom code which working fine
// at the end for the finish order i use:
$pp_response = [
‘order_status’ => $new_status_id, // is defined before
‘reason_text’ => $text_result_deal, // is defined before
];
if (fn_check_payment_script(‘my_custom_payment.php’, $order_id)) {
fn_finish_payment($order_id, $pp_response, true);
fn_order_placement_routines(‘route’, $order_id, true);
}
}
}
Notification email does not sent.
If I try for example C.O.D. payment notifications send successfully. So email settings is fine.
Order states are changed by API. No messages are sent.
Where can be a problem?