/**
* @internal
*/
class AppAsyncPaymentHandlerTest extends AbstractAppPaymentHandlerTestCase
{ final public const REDIRECT_URL = 'http://payment.app/do/something';
public function testPayOtherState(): void
{ $paymentMethodId =
$this->
getPaymentMethodId('async'
);
$orderId =
$this->
createOrder($paymentMethodId);
$transactionId =
$this->
createTransaction($orderId,
$paymentMethodId);
$salesChannelContext =
$this->
getSalesChannelContext($paymentMethodId);
$response =
(new AsyncPayResponse())->
assign([ 'redirectUrl' => self::REDIRECT_URL,
'status' => StateMachineTransitionActions::ACTION_PAID_PARTIALLY,
]);
$this->
appendNewResponse($this->
signResponse($response->
jsonSerialize()));
$this->paymentService->
handlePaymentByOrder($orderId,
new RequestDataBag(),
$salesChannelContext);
$this->
assertOrderTransactionState(OrderTransactionStates::STATE_PARTIALLY_PAID,
$transactionId);
}