Giter VIP home page Giter VIP logo

Comments (5)

DanWebb avatar DanWebb commented on July 2, 2024

Hi @satyendrakumarsingh you should pass all of the parameters received in the POST request from shopify that have a prefix of "x_" apart from the "x_signature". All the params should be merged into a string that's sorted alphabetically with the format "keyvaluekeyvalue...". This string should then be signed using HMAC-SHA256 with the HMAC key set to the password you enter for your gateway in your shops payment settings, as can be seen under "Gateway Signing Mechanism" here. The result of this signing can then be compared against the x_signature parameter passed from Shopify.

When responding you'll need to redirect the customer to x_url_complete with all the values shown here as query parameters appended to the complete url. Meanwhile creating an async POST request to x_url_callback with the request body set to the same query params you passed in the x_url_complete redirect.

I know this is only repeating what's in the docs but sometimes a second explanation can help, and hopefully this helps you.

from hosted-payment-sim.

ShayneP avatar ShayneP commented on July 2, 2024

Thanks Dan! Just to add to this Satyendra, you can check out the docs over at https://docs.shopify.com/api/sdks/hosted-payment-sdk/develop-gateway to see a detailed example of this signing mechanism. The relevant example is about halfway down the page.

from hosted-payment-sim.

prasanthrubyist avatar prasanthrubyist commented on July 2, 2024

@DanWebb , I've same problem in my payment gateway have some required field, But I don't know how to pass shopify required field with my payment required field, Kindly let me know your idea I'm using rails app to develop my payment...Thanks

from hosted-payment-sim.

satyendrakumarsingh avatar satyendrakumarsingh commented on July 2, 2024

Hi @prasanthrubyist when shopify store redirect to hosted payment gateway shopify store sends post(http method) request parameters you have to receive that post request and process all the needed request parameters and after that its up to you that how you can use that request parameters with your payment processor. After that you have to return post(http method) response parameters to the given x_url_complete , x_url_callback. So that shopify store update the order status based on the payment status.

from hosted-payment-sim.

prasanthrubyist avatar prasanthrubyist commented on July 2, 2024

thank you so much! @satyendrakumarsingh

from hosted-payment-sim.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.