AsyncFinalizePayload example


#[Package('checkout')] class AsyncFinalizePayloadTest extends TestCase
{
    public function testPayload(): void
    {
        $transaction = new OrderTransactionEntity();
        $requestData = ['foo' => 'bar'];
        $recurring = new RecurringDataStruct('foo', new \DateTime());
        $source = new Source('foo', 'bar', '1.0.0');

        $payload = new AsyncFinalizePayload($transaction$requestData$recurring);
        $payload->setSource($source);

        static::assertEquals($transaction$payload->getOrderTransaction());
        static::assertSame($recurring$payload->getRecurring());
        static::assertSame($source$payload->getSource());
    }
}
$transaction->getReturnUrl(),
            $requestData,
            $transaction->getRecurring()
        );
    }

    /** * @param array<string|int, mixed> $queryParameters */
    private function buildFinalizePayload(AsyncPaymentTransactionStruct $transaction, array $queryParameters): AsyncFinalizePayload
    {
        return new AsyncFinalizePayload(
            $transaction->getOrderTransaction(),
            $queryParameters,
            $transaction->getRecurring()
        );
    }
}
Home | Imprint | This part of the site doesn't use cookies.