README.md in moiper-0.1.1 vs README.md in moiper-0.1.2
- old
+ new
@@ -1,7 +1,9 @@
# Moiper
+[![Build Status](https://travis-ci.org/reu/moiper.png?branch=master)](https://travis-ci.org/reu/moiper)
+
[Moip payment service](http://moip.com.br/) integration library.
## Installation
Add this line to your application's Gemfile:
@@ -57,11 +59,11 @@
You need to redirect your user to the url returned by `response.checkout_url`. After the user accepts or rejects your payment request, he will be redirected to the `return_url` you specified on the payment. In case of possible errors during the payment request phase, you can access then through the `response.errors` method.
### Notifications
-Moip will notify your application about order updates through [NASP](http://labs.moip.com.br/referencia/nasp/). Moiper provides a Rails controller helper to you can easily intercept these notifications with the `moip_notification` method.
+Moip will notify your application about order updates through [NASP](http://labs.moip.com.br/referencia/nasp/). Moiper provides a Rails controller helper so you can easily intercept these notifications with the `moip_notification` method.
```ruby
class OrdersController < ApplicationController
include Moiper::NotificationControllerHelper
@@ -76,9 +78,17 @@
# Moip will recognize the request as successfully if the statuses
# are 200, 201, 202, 203, 204, 205, 206 or 207.
head 200
end
end
+end
+```
+
+If you are not using Rails, you can manually instantiate a Moiper::Notification class by passing the POST parameters received from Moip's request.
+
+```ruby
+post "/moip/callback" do
+ notification = Moiper::Notification.new(params)
end
```
#### Payment Status