add event payment.canceled

This commit is contained in:
Your Name
2021-06-22 00:37:38 +03:00
parent 643e2562a9
commit 6e57c66a83
2 changed files with 44 additions and 22 deletions

View File

@@ -188,8 +188,8 @@ function checkout_kuri($priceslug, $delivery_id = 1){
else { # заказ создался
if ( $delivery_id == 1 or ($_POST['pay_id']) == 1){
//уводим на оплату в Юкассу
if ( $delivery_id == 1){
//уводим на оплату онлайн в Юкассу
return anpay_kuri($order_id);
}
else { // даем пользователю номер заказа
@@ -199,6 +199,10 @@ function checkout_kuri($priceslug, $delivery_id = 1){
$pi_sql = "UPDATE `price` SET `pieces` = '$pieces' WHERE `price_id` = '{$price_id['price_id']}';";
$pi_res = db_get($pi_sql, 'chitatel');
if ($_POST['pay_id'] == 1){ # оплата на сайте
return anpay_kuri($order_id);
}
if (isset($add['buy_email'])) {
$message = "Ваш платеж ($price руб.) подтвержден. Номер заказа $order_id.\n