Skip to content

Commit 6f2dbd4

Browse files
committed
some Podeli debug
1 parent 658bf6a commit 6f2dbd4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/ApiRequest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,14 @@ public function sendReportGeneralRequest(array $params): array
471471
*/
472472
private function getSignature(MerchantInterface $merchant, string $date, string $url, string $httpMethod, string $bodyHash): string
473473
{
474+
if (strlen($merchant->getCode()) < 2) {
475+
throw new PaymentException('YPMN-001: No Merchant Code');
476+
}
477+
478+
if (strlen($merchant->getCode()) < 2) {
479+
throw new PaymentException('YPMN-001: No Merchant Code');
480+
}
481+
474482
$urlParts = parse_url($url);
475483
$urlHashableParts = $httpMethod . $urlParts['path'];
476484
$this->echoDebugMessage($urlParts);

src/PodeliMerchant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Ypmn;
44

5-
use JsonSerializable;
5+
use \JsonSerializable;
66

77
class PodeliMerchant implements JsonSerializable
88
{

0 commit comments

Comments
 (0)