diff --git a/Components/Services/OrderBuilder/PaymentSource/PaymentSourceValueHandler/AdvancedCreditDebitCardPaymentSourceValueHandler.php b/Components/Services/OrderBuilder/PaymentSource/PaymentSourceValueHandler/AdvancedCreditDebitCardPaymentSourceValueHandler.php index 7d757e83..6978da1b 100644 --- a/Components/Services/OrderBuilder/PaymentSource/PaymentSourceValueHandler/AdvancedCreditDebitCardPaymentSourceValueHandler.php +++ b/Components/Services/OrderBuilder/PaymentSource/PaymentSourceValueHandler/AdvancedCreditDebitCardPaymentSourceValueHandler.php @@ -27,9 +27,6 @@ public function supports($paymentType) */ public function createPaymentSourceValue(PayPalOrderParameter $orderParameter) { - $paymentSourceValue = new Card(); - $paymentSourceValue->setExperienceContext($this->createExperienceContext($orderParameter)); - - return $paymentSourceValue; + return new Card(); } } diff --git a/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/ClassicOrderHandlerTest.php b/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/ClassicOrderHandlerTest.php index 62b0003e..5b493e20 100644 --- a/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/ClassicOrderHandlerTest.php +++ b/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/ClassicOrderHandlerTest.php @@ -199,16 +199,7 @@ public function testCreateOrderForAdvancedCreditDebitCard() $paymentSource = $result->getPaymentSource(); static::assertInstanceOf(PaymentSource::class, $paymentSource); static::assertInstanceOf(PaymentSource\Card::class, $paymentSource->getCard()); - $experienceContext = $paymentSource->getCard()->getExperienceContext(); - static::assertInstanceOf(PaymentSource\ExperienceContext::class, $experienceContext); - - static::assertSame('de-DE', $experienceContext->getLocale()); - static::assertSame('UnitTest AG', $experienceContext->getBrandName()); - static::assertSame('IMMEDIATE_PAYMENT_REQUIRED', $experienceContext->getPaymentMethodPreference()); - static::assertSame('PAYPAL', $experienceContext->getPaymentMethodSelected()); - - static::assertSame('PAY_NOW', $experienceContext->getUserAction()); - static::assertSame('SET_PROVIDED_ADDRESS', $experienceContext->getShippingPreference()); + static::assertNull($paymentSource->getCard()->getExperienceContext()); } /** diff --git a/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/PaymentSource/PaymentSourceHandler/AdvancedCreditDebitCartPaymentSourceHandlerTest.php b/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/PaymentSource/PaymentSourceHandler/AdvancedCreditDebitCartPaymentSourceHandlerTest.php index b61db43b..2d779e5f 100644 --- a/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/PaymentSource/PaymentSourceHandler/AdvancedCreditDebitCartPaymentSourceHandlerTest.php +++ b/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/PaymentSource/PaymentSourceHandler/AdvancedCreditDebitCartPaymentSourceHandlerTest.php @@ -53,11 +53,7 @@ public function testCreatePaymentSource() $paymentSourceValueResult = $result->getCard(); static::assertInstanceOf(PaymentSource\Card::class, $paymentSourceValueResult); - $experienceContextValueResult = $paymentSourceValueResult->getExperienceContext(); - static::assertInstanceOf(PaymentSource\ExperienceContext::class, $experienceContextValueResult); - - static::assertSame('SET_PROVIDED_ADDRESS', $experienceContextValueResult->getShippingPreference()); - static::assertSame('PAY_NOW', $experienceContextValueResult->getUserAction()); + static::assertNull($paymentSourceValueResult->getExperienceContext()); } /** diff --git a/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/PaymentSource/PaymentSourceValueHandler/AdvancedCreditDebitCardPaymentSourceValueHandlerTest.php b/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/PaymentSource/PaymentSourceValueHandler/AdvancedCreditDebitCardPaymentSourceValueHandlerTest.php index 561547f0..f6c8aeda 100644 --- a/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/PaymentSource/PaymentSourceValueHandler/AdvancedCreditDebitCardPaymentSourceValueHandlerTest.php +++ b/Tests/Functional/Components/Services/OrderBuilder/OrderHandler/PaymentSource/PaymentSourceValueHandler/AdvancedCreditDebitCardPaymentSourceValueHandlerTest.php @@ -17,7 +17,6 @@ use SwagPaymentPayPalUnified\PayPalBundle\Components\SettingsServiceInterface; use SwagPaymentPayPalUnified\PayPalBundle\PaymentType; use SwagPaymentPayPalUnified\PayPalBundle\V2\Api\Order\PaymentSource\Card; -use SwagPaymentPayPalUnified\PayPalBundle\V2\Api\Order\PaymentSource\ExperienceContext; use SwagPaymentPayPalUnified\Tests\Functional\AssertStringContainsTrait; use SwagPaymentPayPalUnified\Tests\Functional\ContainerTrait; use SwagPaymentPayPalUnified\Tests\Functional\ShopRegistrationTrait; @@ -48,16 +47,7 @@ public function testCreatePaymentSourceValue() static::assertInstanceOf(Card::class, $result); - $experienceContextResult = $result->getExperienceContext(); - static::assertInstanceOf(ExperienceContext::class, $experienceContextResult); - - static::assertSame('de-DE', $experienceContextResult->getLocale()); - static::assertSame('anyBrandName', $experienceContextResult->getBrandName()); - static::assertSame('IMMEDIATE_PAYMENT_REQUIRED', $experienceContextResult->getPaymentMethodPreference()); - static::assertSame('PAYPAL', $experienceContextResult->getPaymentMethodSelected()); - static::assertSame('NO_PREFERENCE', $experienceContextResult->getLandingPage()); - static::assertSame('SET_PROVIDED_ADDRESS', $experienceContextResult->getShippingPreference()); - static::assertSame('PAY_NOW', $experienceContextResult->getUserAction()); + static::assertNull($result->getExperienceContext()); } /** diff --git a/plugin.xml b/plugin.xml index a63237e0..26d5d4ec 100644 --- a/plugin.xml +++ b/plugin.xml @@ -15,9 +15,11 @@ PT-13142 - Verbessert die Bearbeitung von Webhooks; + PT-13143 - Behebt ein Problem mit der Kreditkarten Zahlung; PT-13142 - Improves the processing of webhooks; + PT-13143 - Fixes a problem with credit card payment;