What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, I am trying to implement payment module- not payone but, I follow this documentation

U03SW5W1BDX
U03SW5W1BDX Posts: 31 🧑🏻‍🚀 - Cadet

Hello, I am trying to implement payment module- not payone but, I follow this documentation https://docs.spryker.com/docs/scos/user/technology-partners/202108.0/payment-partners/bs-payone/bs-payone.html#integration-with-[…]ependencyprovider which is not up to date with newest spryker, do You know maybe where is now src/<project_name>/Yves/Checkout/Process/Steps/SuccessStep.php ?
I can't find it. For example CheckoutDependencyProvider is now CheckoutPageDependencyProvider, YvesBootstrap is RouterDependencyProvider The problem is there is no redirect on Summary page for payment provider. I even added merchant data

Comments

  • sebastian.larisch
    sebastian.larisch Spryker Customer Posts: 143 🧑🏻‍🚀 - Cadet

    SprykerShop\Yves\CheckoutPage\Process\Steps\SuccessStep

  • U03SW5W1BDX
    U03SW5W1BDX Posts: 31 🧑🏻‍🚀 - Cadet

    I overrrided it in src/Pyz/SprykerShop/Yves/CheckoutPage/Process/Steps/SuccessStep.php but with no effect, it's not being used, I dumped text to logs and it's not visible

  • U03SW5W1BDX
    U03SW5W1BDX Posts: 31 🧑🏻‍🚀 - Cadet

    and I am on success page

  • Alberto Reyer
    Alberto Reyer Posts: 690 🪐 - Explorer

    Did you overwrote \SprykerShop\Yves\CheckoutPage\CheckoutPageFactory::createStepFactory and \SprykerShop\Yves\CheckoutPage\Process\StepFactory::createSuccessStep to use your new class?

  • U03SW5W1BDX
    U03SW5W1BDX Posts: 31 🧑🏻‍🚀 - Cadet
    edited August 2022

    StepFactory -> yes
    CheckoutPageFactory -> no, with what update createStepFactory? It's only returning new StepFactory(); there

  • Alberto Reyer
    Alberto Reyer Posts: 690 🪐 - Explorer

    I assume CheckoutPageFactory::createStepFactory() still returns the Spryker class, but need to return your new class

  • U03SW5W1BDX
    U03SW5W1BDX Posts: 31 🧑🏻‍🚀 - Cadet
    edited August 2022

    Ok I lacked dependency in Zed: rc/Pyz/Zed/Checkout/CheckoutDependencyProvider.php,

  • U03SW5W1BDX
    U03SW5W1BDX Posts: 31 🧑🏻‍🚀 - Cadet

    Ok I have now error:

    [zed-gateway] [backend_gateway_eu] - [2022-08-23T14:27:14.588324+00:00] Zed.CRITICAL: Error - Call to a member function getEmail() on null in "/data/vendor/novalnet/sprykerb2c-payment/src/Novalnet/Zed/NovalnetPayment/Business/Payment/PaymentManager.php::141" {"exception":"[object] (Error(code: 0): Call to a member function getEmail() on null at /data/vendor/novalnet/sprykerb2c-payment/src/Novalnet/Zed/NovalnetPayment/Business/Payment/PaymentManager.php:141)
    [stacktrace]
    

    Do You know how CustomerDependencyProvider should look like? Because in instruction they copied twice CheckoutDependencyProvider code...It looks getCustomer is outputing null

  • Alberto Reyer
    Alberto Reyer Posts: 690 🪐 - Explorer

    Seems like the customer was not hydrated to the order during the authorize command in the state machine.

    You could check if CustomerOrderHydratePlugin is wired correctly in \Pyz\Zed\Sales\SalesDependencyProvider::getOrderHydrationPlugins. This should add the customer transfer to the order transfer when ever an order is loaded.

  • U03SW5W1BDX
    U03SW5W1BDX Posts: 31 🧑🏻‍🚀 - Cadet

    CustomerOrderHydratePlugin is added to getOrderHydrationPlugins in SalesDependencyProvider by default, is it all what is needed?

  • Alberto Reyer
    Alberto Reyer Posts: 690 🪐 - Explorer

    I don't know, try it and check if there is any error.

  • U03SW5W1BDX
    U03SW5W1BDX Posts: 31 🧑🏻‍🚀 - Cadet

    I have this error still, but I now understand what is wrong- I don't have payment provider template with text about redirection, the default empty template is loaded

  • U03SW5W1BDX
    U03SW5W1BDX Posts: 31 🧑🏻‍🚀 - Cadet

    On screenshot there are screens- twig-novalnet2 is how it is now, twig-novalnet- how it should look like