From b12955fe243ee586f479abfbd14a63cec5e58831 Mon Sep 17 00:00:00 2001 From: Dan Kim Date: Tue, 1 Nov 2016 18:42:06 +0300 Subject: [PATCH] Add Notification to README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 56cb8d3..79b91cd 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,14 @@ Tinkoff::Client.state(1) You can view all available options in the [official documentation](https://oplata.tinkoff.ru/documentation/?section=aboutMet). +A notification will be sent to if you provided the URL. You should use it to update the status of your payment / order. + +```ruby +notification = Tinkoff::Notification.new(params) +order = Order.find(notification.order_id) +order.update_attribute(:paid, true) +``` + ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`.