Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
payment.php
1<?php
2
3
5
6
11
12Loc::loadMessages(__FILE__);
13
14class Payment extends Base
15{
16 static public function paidNotify(Event $event)
17 {
19 $payment = $event->getParameters()['ENTITY'];
20
22 $colletion = $payment->getCollection();
23 $order = $colletion->getOrder();
24
25 if(static::isSync($order) == true)
26 {
27 if($payment->isPaid())
28 {
29 $settings = [
30 'ENTITY_TYPE_ID' =>Integration\CRM\EntityType::ORDER_PAYMENT,
31 'FIELD_NAME' => 'PAID',
32 'CURRENT_VALUE' => 'Y',
33 'LEGEND' => Loc::getMessage('SALE_INTEGRATION_B24_TIMELINE_PAYMENT_NUMBER').$payment->getId().'. '.$payment->getPaymentSystemName(),
34 ];
35
36 static::onReceive($order->getId(), $settings);
37 }
38 }
39 }
40}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29