Skip to content

Commit 4029b8d

Browse files
committed
Merge branch 'fix__ypmnPaymentReference' into 'main'
FIX: ypmnPaymentReference change to payuPaymentReference in Webhook.php See merge request ypmn-public/php-api-client!19
2 parents e2744c3 + 5b35ee0 commit 4029b8d

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

src/OrderData.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class OrderData implements OrderDataInterface
88
private string $orderDate;
99

1010
/** @var string Номер платежа Ypmn */
11-
private string $ypmnPaymentReference;
11+
private string $payUPaymentReference;
1212

1313
/** @var string */
1414
private string $merchantPaymentReference;
@@ -51,15 +51,29 @@ public function setOrderDate(string $orderDate): self
5151
/** @inheritDoc */
5252
public function setYpmnPaymentReference(string $ypmnPaymentReference): self
5353
{
54-
$this->ypmnPaymentReference = $ypmnPaymentReference;
54+
$this->payUPaymentReference = $ypmnPaymentReference;
5555

5656
return $this;
5757
}
5858

5959
/** @inheritDoc */
6060
public function getYpmnPaymentReference(): string
6161
{
62-
return $this->ypmnPaymentReference;
62+
return $this->payUPaymentReference;
63+
}
64+
65+
/** @inheritDoc */
66+
public function setPayUPaymentReference(string $payUPaymentReference): self
67+
{
68+
$this->payUPaymentReference = $payUPaymentReference;
69+
70+
return $this;
71+
}
72+
73+
/** @inheritDoc */
74+
public function getPayUPaymentReference(): string
75+
{
76+
return $this->payUPaymentReference;
6377
}
6478

6579
/** @inheritDoc */

src/OrderDataInterface.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,32 @@ public function setOrderDate(string $orderDate): self;
2121
/**
2222
* Получить Номер Заказа в Ypmn
2323
* @return string Номер Заказа в Ypmn
24+
*
25+
* @deprecated Используйте getPayUPaymentReference
2426
*/
2527
public function getYpmnPaymentReference(): string;
2628

2729
/**
2830
* Установить Номер Заказа в Ypmn
2931
* @param string $ypmnPaymentReference Номер Заказа в Ypmn
3032
* @return $this
33+
*
34+
* @deprecated Используйте setPayUPaymentReference
3135
*/
3236
public function setYpmnPaymentReference(string $ypmnPaymentReference): self;
3337

38+
/**
39+
* Получить Номер Заказа в Ypmn
40+
* @return string Номер Заказа в Ypmn
41+
*/
42+
public function getPayUPaymentReference(): string;
43+
/**
44+
* Установить Номер Заказа в Ypmn
45+
* @param string $payUPaymentReference Номер Заказа в Ypmn
46+
* @return $this
47+
*/
48+
public function setPayUPaymentReference(string $payUPaymentReference): self;
49+
3450
/**
3551
* Получить Номер Заказа у Мерчанта
3652
* @return string Номер Заказа у Мерчанта

src/Webhook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function catchJsonRequest(): self
2929

3030
$this->orderData = new OrderData;
3131
$this->orderData->setOrderDate($request['orderData']['orderDate']);
32-
$this->orderData->setYpmnPaymentReference($request['orderData']['ypmnPaymentReference']);
32+
$this->orderData->setPayUPaymentReference($request['orderData']['payuPaymentReference']);
3333
$this->orderData->setMerchantPaymentReference($request['orderData']['merchantPaymentReference']);
3434
$this->orderData->setStatus($request['orderData']['status']);
3535
$this->orderData->setCurrency($request['orderData']['currency']);

0 commit comments

Comments
 (0)