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!

有帮助吗?

解决方案 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

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top