poundpay 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -7,7 +7,7 @@ Poundpay is a payments platform for marketplaces
7
7
 
8
8
  1. Add the following to your Gemfile
9
9
 
10
- gem 'poundpay', '~> 0.2.3'
10
+ gem 'poundpay', '~> 0.2.0'
11
11
 
12
12
  2. At the command prompt, install the gem with bundler
13
13
 
@@ -70,16 +70,12 @@ Poundpay is a payments platform for marketplaces
70
70
  </script>
71
71
 
72
72
 
73
- == Releasing a payment
73
+ == Payment methods
74
74
 
75
75
  payment = Poundpay::Payment.find(payment_sid)
76
- payment.release
77
-
78
-
79
- == Cancel a payment
80
-
81
- payment = Poundpay::Payment.find(payment_sid)
82
- payment.cancel
76
+ payment.escrow # AUTHORIZED -> ESCROWED. Credit card is charged
77
+ payment.release # ESCROWED -> RELEASED. Recipient receives money
78
+ payment.cancel # ESCROWED -> CANCELED. Payer receives refund
83
79
 
84
80
 
85
81
  == Setting callback url
@@ -21,16 +21,18 @@ module Poundpay
21
21
  end
22
22
 
23
23
 
24
- module ActionController
25
- class Base
26
- protected
27
- def verify_poundpay_callback
28
- signature = request.headers['HTTP_X_POUNDPAY_SIGNATURE']
29
- Poundpay.verified_callback?(signature, request.POST) || handle_unverified_poundpay_callback
30
- end
24
+ if defined? Rails
25
+ module ActionController
26
+ class Base
27
+ protected
28
+ def verify_poundpay_callback
29
+ signature = request.headers['HTTP_X_POUNDPAY_SIGNATURE']
30
+ Poundpay.verified_callback?(signature, request.POST) || handle_unverified_poundpay_callback
31
+ end
31
32
 
32
- def handle_unverified_poundpay_callback
33
- raise RoutingError.new('Not Found')
34
- end
33
+ def handle_unverified_poundpay_callback
34
+ raise RoutingError.new('Not Found')
35
+ end
36
+ end
35
37
  end
36
38
  end
@@ -1,3 +1,3 @@
1
1
  module Poundpay
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 6
9
- version: 0.2.6
8
+ - 7
9
+ version: 0.2.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matin Tamizi
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-04-20 00:00:00 -07:00
17
+ date: 2011-04-24 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency