Skip to content

Commit

Permalink
big update
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Jun 10, 2022
1 parent 4ab82c6 commit 9b415b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/YookassaPaysystemHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ public function actionPayOrder(ShopOrder $shopOrder)
\Yii::info(print_r($payment, true), self::class);

if (!$payment->id) {
\Yii::error('Yandex kassa payment id not found', self::class);
throw new Exception('Yandex kassa payment id not found');
}

Expand All @@ -241,6 +242,7 @@ public function actionPayOrder(ShopOrder $shopOrder)
];

if (!$model->save()) {
\Yii::error("Не удалось сохранить платеж: ".print_r($model->errors, true), self::class);
throw new Exception("Не удалось сохранить платеж: ".print_r($model->errors, true));
}

Expand Down
5 changes: 3 additions & 2 deletions src/controllers/YookassaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public function actionPaymentListener()
\Yii::info("Оплата: ".print_r($shopBill->id, true), self::class);

if (!$shopBill) {
throw new Exception("Не найден платеж на сайте");
\Yii::error("Не найден счет на сайте " . $paymentId, self::class);
throw new Exception("Не найден счет на сайте " . $paymentId);
}

/*
Expand Down Expand Up @@ -112,7 +113,7 @@ public function actionPaymentListener()
$shopPayment->amount = $shopBill->amount;
$shopPayment->currency_code = $shopBill->currency_code;
$shopPayment->shop_pay_system_id = $shopBill->shop_pay_system_id;
$shopPayment->shop_buyer_id = $shopBill->shop_buyer_id;
$shopPayment->cms_user_id = $shopBill->cms_user_id;
$shopPayment->shop_order_id = $shopBill->shop_order_id;
$shopPayment->external_id = $shopBill->external_id;
$shopPayment->external_data = $shopBill->external_data;
Expand Down

0 comments on commit 9b415b9

Please sign in to comment.