문제

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