From c40f51f95434acf6288d7edc42a6ff53d8896c2a Mon Sep 17 00:00:00 2001 From: Nuryagdy Mustapayev Date: Mon, 27 May 2024 14:45:06 +0200 Subject: [PATCH] added $session->remove('card'); to examples --- docs/THREED-PAYMENT-EXAMPLE.md | 1 + docs/THREED-SECURE-AND-PAY-PAYMENT-IN-MODALBOX-EXAMPLE.md | 3 ++- examples/_templates/_payment_secure_response.php | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/THREED-PAYMENT-EXAMPLE.md b/docs/THREED-PAYMENT-EXAMPLE.md index c2ef4725..dbb19610 100644 --- a/docs/THREED-PAYMENT-EXAMPLE.md +++ b/docs/THREED-PAYMENT-EXAMPLE.md @@ -259,6 +259,7 @@ if (\Mews\Pos\PosInterface::MODEL_3D_HOST !== $paymentModel) { if (get_class($pos) === \Mews\Pos\Gateways\PayFlexV4Pos::class) { // bu gateway için ödemeyi tamamlarken tekrar kart bilgisi lazım. $cardData = $session->get('card'); + $session->remove('card'); $card = \Mews\Pos\Factory\CreditCardFactory::createForGateway( $pos, $cardData['card_number'], diff --git a/docs/THREED-SECURE-AND-PAY-PAYMENT-IN-MODALBOX-EXAMPLE.md b/docs/THREED-SECURE-AND-PAY-PAYMENT-IN-MODALBOX-EXAMPLE.md index 75a50264..30d541cb 100644 --- a/docs/THREED-SECURE-AND-PAY-PAYMENT-IN-MODALBOX-EXAMPLE.md +++ b/docs/THREED-SECURE-AND-PAY-PAYMENT-IN-MODALBOX-EXAMPLE.md @@ -241,7 +241,8 @@ $order = $session->get('order'); $card = null; if (get_class($pos) === \Mews\Pos\Gateways\PayFlexV4Pos::class) { // bu gateway için ödemeyi tamamlarken tekrar kart bilgisi lazım. - $cardData = $session->get('card'); + $cardData = $session->get('card') + $session->remove('card'); $card = \Mews\Pos\Factory\CreditCardFactory::createForGateway( $pos, $cardData['card_number'], diff --git a/examples/_templates/_payment_secure_response.php b/examples/_templates/_payment_secure_response.php index 714858b0..a5b65807 100644 --- a/examples/_templates/_payment_secure_response.php +++ b/examples/_templates/_payment_secure_response.php @@ -79,6 +79,7 @@ if (get_class($pos) === \Mews\Pos\Gateways\PayFlexV4Pos::class) { // bu gateway için ödemeyi tamamlarken tekrar kart bilgisi lazım. $savedCard = $session->get('card'); + $session->remove('card'); $card = createCard($pos, $savedCard); } // ============================================================================================