Skip to content

Commit 2679ac1

Browse files
author
Alexey Babak
committed
style fix
1 parent 02872d2 commit 2679ac1

File tree

3 files changed

+46
-2
lines changed

3 files changed

+46
-2
lines changed

src/CaptureApiRequest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class CaptureApiRequest
1313
const AUTHORIZE_API = '/api/v4/payments/refund';
1414
const HOST = 'https://sandbox.payu.ru';
1515

16-
// public function sendRequest(array $data, $merchantCode, $secret): array
1716
public function sendRequest(CaptureInterface $capture, MerchantInterface $merchant): array
1817
{
1918
$encodedJsonData = $capture->jsonSerialize();
@@ -54,7 +53,6 @@ public function sendRequest(CaptureInterface $capture, MerchantInterface $mercha
5453
return ['response' => $response, 'error' => $err];
5554
}
5655

57-
// private function getSignature($merchantCode, $secret, $date, $url, $httpMethod, $bodyHash): string
5856
private function getSignature(MerchantInterface $merchant, $date, $url, $httpMethod, $bodyHash): string
5957
{
6058
$urlParts = parse_url($url);

src/Examples/start.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@
99
* (получите Интеграционный Код Мерчанта и Секретный Ключ у вашего менеджера YPMN)
1010
*
1111
* Теперь включайте этот файл везде, где работаете с платежами
12+
*
13+
* Запросы от вашего приложения будут отправляться на:
14+
* https://secure.ypmn.ru/
15+
* https://sandbox.ypmn.ru/
1216
*/
1317
$merchant = new Merchant('CC1', 'SECRET_KEY');
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
namespace Ypmn;
4+
5+
/**
6+
* Это объект Сабмерчанта (для маркетплейса)
7+
*/
8+
interface MarketplaceSubmerchantInterface
9+
{
10+
/**
11+
* Установить Код Сабмерчанта (для маркетплейса)
12+
* @param string $merchantCode
13+
* @return $this
14+
*/
15+
public function setMerchantCode(string $merchantCode) : self;
16+
17+
/**
18+
* Получить Код Сабмерчанта (для маркетплейса)
19+
* @return string
20+
*/
21+
public function getMerchantCode() : string;
22+
23+
/**
24+
* Установить Сумму
25+
* @param int $amount
26+
* @return $this
27+
*/
28+
public function setAmount(int $amount) : self;
29+
30+
/**
31+
* Получить Сумму
32+
* @return int
33+
*/
34+
public function getAmount() : int;
35+
36+
37+
/**
38+
* Преобразовать в массив
39+
* @return mixed объект в виде массива
40+
*/
41+
public function arraySerialize();
42+
}

0 commit comments

Comments
 (0)