static::
assertNotEmpty($request->
getHeaderLine(AuthMiddleware::SHOPWARE_CONTEXT_LANGUAGE
));
static::
assertSame('POST',
$request->
getMethod());
static::
assertJson($body);
$content = \
json_decode($body, true, 512, \JSON_THROW_ON_ERROR
);
static::
assertArrayHasKey('source',
$content);
static::
assertSame([ 'url' =>
$this->shopUrl,
'shopId' =>
$this->shopIdProvider->
getShopId(),
'appVersion' => '1.0.0',
],
$content['source'
]);
$this->
assertOrderTransactionState(OrderTransactionStates::STATE_PAID,
$transactionId);
} public function testItFailsOnErrorResponse(): void
{ $paymentMethodId =
$this->
getPaymentMethodId('recurring'
);
$orderId =
$this->
createOrder($paymentMethodId);
$transactionId =
$this->
createTransaction($orderId,
$paymentMethodId);
$response = RecurringPayResponse::
create($transactionId,
[ 'message' => 'FOO_BAR_ERROR_MESSAGE',
]);