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 9, 2022
1 parent fa1d2f1 commit 067e06c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/YookassaPaysystemHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,14 @@ public function actionPayOrder(ShopOrder $shopOrder)
* Для чеков нужно указывать информацию о товарах
* https://yookassa.ru/developers/api?lang=php#create_payment
*/
$shopBuyer = $shopOrder->shopBuyer;
$contact_email = $shopOrder->contact_email;
$contact_name = $shopOrder->contact_first_name . " " . $shopOrder->contact_last_name;
$receipt = [];
if ($yooKassa->is_receipt) {
if (trim($shopBuyer->email)) {
if (trim($contact_email)) {
$receipt['customer'] = [
'email' => trim($shopBuyer->email),
'full_name' => trim($shopBuyer->name),
'email' => trim($contact_email),
'full_name' => trim($contact_name),
];
}

Expand Down

0 comments on commit 067e06c

Please sign in to comment.