Skip to content

Commit

Permalink
Verify IPN with order from shop
Browse files Browse the repository at this point in the history
CS-5639
  • Loading branch information
MarijaIv committed Jul 5, 2024
1 parent 5ce6d48 commit dc770e0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ class MockShopErrorOrderService implements ShopOrderService
*/
public function updateStatus(
Webhook $webhook,
string $status,
?int $reasonCode = null,
string $status,
?int $reasonCode = null,
?string $message = null
) {
)
{
throw new HttpRequestException('Error updating shop order status.');
}

Expand All @@ -59,7 +60,7 @@ public function getStatisticsOrderIds(int $page, int $limit = 5000): array
*/
public function getOrderUrl(string $merchantReference): string
{
return '';
return '';
}

/**
Expand All @@ -71,7 +72,7 @@ public function getCreateOrderRequest(string $orderReference): CreateOrderReques
$merchant = new Merchant('testMerchantId');
$merchantReference = new MerchantReference('test123');
$cart = new Cart('testCurrency', false, [
new ProductItem('testItemReference','testName', 5,2, 10, false)
new ProductItem('testItemReference', 'testName', 5, 2, 10, false)
], $orderReference);

$deliveryMethod = new DeliveryMethod('testDeliveryMethodName');
Expand All @@ -93,8 +94,8 @@ public function getCreateOrderRequest(string $orderReference): CreateOrderReques
'ES'
);

$customer = new Customer('[email protected]','testCode','testIpNum','testAgent');
$platform = new Platform('testName','testVersion','testUName','testDbName','testDbVersion');
$customer = new Customer('[email protected]', 'testCode', 'testIpNum', 'testAgent');
$platform = new Platform('testName', 'testVersion', 'testUName', 'testDbName', 'testDbVersion');
$gui = new Gui(Gui::ALLOWED_VALUES['desktop']);

return new CreateOrderRequest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ class MockShopOrderService implements ShopOrderService
*/
public function updateStatus(
Webhook $webhook,
string $status,
?int $reasonCode = null,
string $status,
?int $reasonCode = null,
?string $message = null
): void {
): void
{
}

/**
Expand Down Expand Up @@ -73,7 +74,7 @@ public function getCreateOrderRequest(string $orderReference): CreateOrderReques
$merchant = new Merchant('testMerchantId');
$merchantReference = new MerchantReference('test123');
$cart = new Cart('testCurrency', false, [
new ProductItem('testItemReference','testName', 5,2, 10, false)
new ProductItem('testItemReference', 'testName', 5, 2, 10, false)
], $orderReference);

$deliveryMethod = new DeliveryMethod('testDeliveryMethodName');
Expand All @@ -95,8 +96,8 @@ public function getCreateOrderRequest(string $orderReference): CreateOrderReques
'ES'
);

$customer = new Customer('[email protected]','testCode','testIpNum','testAgent');
$platform = new Platform('testName','testVersion','testUName','testDbName','testDbVersion');
$customer = new Customer('[email protected]', 'testCode', 'testIpNum', 'testAgent');
$platform = new Platform('testName', 'testVersion', 'testUName', 'testDbName', 'testDbVersion');
$gui = new Gui(Gui::ALLOWED_VALUES['desktop']);

return new CreateOrderRequest(
Expand Down

0 comments on commit dc770e0

Please sign in to comment.