Calling Developers!
We are reenergizing our code contribution process! Learn More

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..

Framework for 3rd party integration?

Options
U053S65CG7N
U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
edited May 2023 in Help

Hi Everyone, I have doubt about third party integration in spryker, Is there any framework provided by spryker for third party integration?

Please guide me for this.

Comments

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer
    Options

    That pretty much depends on what you want to integrate.
    Is it file based, for example CSV/XML/etc., probably the middleware is the best place to look at: https://docs.spryker.com/docs/scos/dev/back-end-development/data-manipulation/data-ingestion/spryker-middleware.html#overview

    For all others it pretty much depends on where you want to integrate it and how deeply the 3rd party should be integrated.
    But there is no out of the box feature which just maps a field from a 3rd party api to an internal field if you ask for something like this. Mainly because there is often a lot more necessary to integrate the 3rd party (authentication, error handling, synchronous/asynchronous integration parts).

    Maybe you can explain what you want in more detail so others can give a better guidance on where to start

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    Is There is already any api is using in spryker

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer
    Options

    In https://github.com/spryker-eco/ there are plenty of integration examples, most of them are HTTP API based

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    using middleware ?

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited May 2023
    Options

    or using any otherway?

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer
    Options

    Is it file based, for example CSV/XML/etc., probably the middleware is the best place to look at

    Middleware is mainly focused on file based integrations.
    You can implement a Reader that reads from an API instead of a file, but I'm not sure if this is the best approach for what you want to achieve, as it is still unclear what you want to integrate where.

    If you could give a few more information what you want to integrate and into which part of spryker it is easier to give you an advice. Your initial question is so generic that I can only give you the possible directions for an integration

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    tell me please which middleware in existing spryker code i can take hint from

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    i want to integrate basic get and post api in spryker

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    which is returning json data

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer
    Options

    On that basic information, there is the Guzzle HTTP Client in Spryker you can use to access any HTTP based API.
    Guzzle Documentation is available at https://docs.guzzlephp.org/en/stable/

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    i have done it using curl

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer
    Options

    Which is fine as well

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    this is monual way

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    but i am finding out of the box available framework in spryker for third party api call

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    can you help me to call an api using middleware in spryker

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer
    Options

    I have the feeling we go in circles here. From your initial, generic question, middleware was one direction you could go with, given the limited information you gave.

    If you want to import batches of data, primarily file based, middleware is the way to go, how is documented at https://docs.spryker.com/docs/scos/dev/back-end-development/data-manipulation/data-ingestion/spryker-middleware.html#pipeline-structure

    But if you want to integrate for example a payment provider into the checkout there are better options.

    So again, please give a few more specific information on what you want to integrate into which part of Spryker. Depending on this information middleware can be the best option, but maybe another solution would fit a lot better.

    Something like:

    I want to integrate a JSON API from payment provider X into the checkout so a Customer is able to pay via Creditcard and the payment is processed through payment provider X.

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    ok suppose i want to use rezorpay so how

  • U053S65CG7N
    U053S65CG7N Posts: 14 πŸ§‘πŸ»β€πŸš€ - Cadet
    Options

    i can do it

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer
    Options

    So you want to integrate a payment provider.
    You can have a look at https://github.com/spryker-eco/adyen to see how to integrate a new payment provider. Sadly payment providers are very complex, as they need to be integrated into the checkout and into the OMS to work properly.
    This requires to write a few spryker plugins (see https://github.com/spryker-eco/adyen/tree/master/src/SprykerEco/Zed/Adyen/Communication/Plugin, https://github.com/spryker-eco/adyen/tree/master/src/SprykerEco/Yves/Adyen/Plugin)