Domanda

I am creating a Rails 3.2 app and I am using Paymill as the payment gateway. I am trying to setup a webhook on my system (Already setup on Paymill side). This webhook should respond to callbacks when a transaction was successful.

How can I "capture" the response object in my code? Using params?

Thankful for all help!

È stato utile?

Soluzione 2

A webhook call from Paymill includes a JSON in the request. This JSON includes some meta data about the event that was triggered and the objects affected. So, you'd have to take the request body and parse the JSON to extract the information you are looking for. You can see a sample JSON file here:

https://www.paymill.com/de-de/dokumentation/referenz/api-referenz/#events

Altri suggerimenti

I don't know paymill, but it looks like it works the same way as stripe.

Thus, you have to handle the response with params.

You can have a look on this code sample: https://github.com/apalancat/paymill-rails

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top