pxpay 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -4
- data/Gemfile.lock +2 -0
- data/README.md +23 -17
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/lib/pxpay.rb +1 -0
- data/lib/pxpay/base.rb +1 -0
- data/lib/pxpay/init.rb +1 -1
- data/lib/pxpay/install_generator.rb +1 -0
- data/lib/pxpay/notification.rb +13 -3
- data/lib/pxpay/request.rb +8 -6
- data/lib/pxpay/response.rb +8 -3
- data/pxpay.gemspec +15 -8
- data/test/helper.rb +3 -0
- data/test/pxpay.yml +6 -0
- data/test/response.xml +1 -0
- data/test/test_pxpay.rb +55 -2
- metadata +56 -29
- data/lib/pxpay/templates/pxpay.rb +0 -0
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
PxPay
|
2
2
|
=======
|
3
3
|
A Rubygem to integrate DPS-hosted payments through the Payment Express PxPay system.
|
4
|
-
|
5
|
-
|
4
|
+
|
5
|
+
For self-hosted systems check out the amazing [ActiveMerchant](https://www.github.com/Shopify/active_merchant) gem.
|
6
|
+
|
7
|
+
See <http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay.html> or <http://www.paymentexpress.com/downloads/DPSECOM_PXPay.pdf> for more details about PxPay.
|
6
8
|
|
7
9
|
Installation
|
8
10
|
------------
|
9
11
|
Install from Rubygems
|
10
12
|
gem install pxpay
|
11
|
-
Then run `rails
|
13
|
+
Then run `rails generate pxpay:install` to copy an initializer and a config yml file to your rails app.
|
12
14
|
Make sure you add your own development credentials to the `config/pxpay.yml` file and create success and failure URLs for Payment Express to redirect you back to
|
13
|
-
You can apply for a development account at https://www.paymentexpress.com/pxmi/apply
|
15
|
+
You can apply for a development account at <https://www.paymentexpress.com/pxmi/apply>
|
14
16
|
|
15
17
|
|
16
18
|
Usage
|
@@ -30,7 +32,9 @@ To send your customer to Payment Express for payment make a call to Pxpay::Reque
|
|
30
32
|
redirect_to request.url
|
31
33
|
end
|
32
34
|
|
33
|
-
Once your customer has entered their details Payment Express will redirect
|
35
|
+
Once your customer has entered their details Payment Express will redirect them back to the success URL that you provided.
|
36
|
+
|
37
|
+
Use Pxpay:Response to get the transaction details back from Payment Express.
|
34
38
|
|
35
39
|
def success
|
36
40
|
response = Pxpay::Response.new(params).response
|
@@ -38,22 +42,23 @@ Once your customer has entered their details Payment Express will redirect the b
|
|
38
42
|
## Do something with the results hash
|
39
43
|
end
|
40
44
|
|
41
|
-
N.B. There is a minor caveat here: Payment Express
|
42
|
-
each transaction, so you must allow for this in your code. See <http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay.html#ResultNotification> for details.
|
45
|
+
N.B. There is a minor caveat here: Payment Express includes a system called fail-proof result notification where as soon as the customer has finished the transaction they will send a background request.
|
43
46
|
|
47
|
+
This means your success/failure URL will be hit at least twice for each transaction, so you must allow for this in your code. See <http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay.html#ResultNotification> for details.
|
44
48
|
|
45
|
-
|
46
|
-
|
47
|
-
Add ability to set global configuration options
|
48
|
-
Token Billing
|
49
|
-
Remove rails dependencies
|
50
|
-
|
51
|
-
This gem is as of yet untested.
|
49
|
+
N.B.
|
50
|
+
----
|
52
51
|
|
53
52
|
This gem is in no way endorsed or affiliated with Payment Express
|
54
53
|
|
55
|
-
|
56
|
-
|
54
|
+
TODO
|
55
|
+
----
|
56
|
+
* Add ability to set global configuration options
|
57
|
+
* Add more tests
|
58
|
+
* Token Billing
|
59
|
+
|
60
|
+
Contributing to PxPay
|
61
|
+
=====================
|
57
62
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
58
63
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
59
64
|
* Fork the project
|
@@ -62,7 +67,8 @@ This gem is in no way endorsed or affiliated with Payment Express
|
|
62
67
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
63
68
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
64
69
|
|
65
|
-
|
70
|
+
Copyright
|
71
|
+
=========
|
66
72
|
|
67
73
|
Copyright (c) 2011 Bradley Priest. See LICENSE.txt for
|
68
74
|
further details.
|
data/Rakefile
CHANGED
@@ -21,6 +21,7 @@ Jeweler::Tasks.new do |gem|
|
|
21
21
|
gem.authors = ["Bradley Priest"]
|
22
22
|
gem.add_dependency 'nokogiri'
|
23
23
|
gem.add_dependency 'rest-client'
|
24
|
+
gem.add_dependency 'builder'
|
24
25
|
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
25
26
|
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
26
27
|
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/pxpay.rb
CHANGED
data/lib/pxpay/base.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
module Pxpay
|
2
|
+
# The base Pxpay class, contains the acceptable currency types and the details that are returned from Payment Express
|
2
3
|
class Base
|
3
4
|
# A list of the acceptable payment currencies
|
4
5
|
# See http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxpay.html#Properties
|
data/lib/pxpay/init.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
PXPAY_CONFIG = YAML.load_file("#{Rails.root}/config/pxpay.yml")[Rails.env]
|
1
|
+
PXPAY_CONFIG = YAML.load_file("#{Rails.root}/config/pxpay.yml")[Rails.env]
|
data/lib/pxpay/notification.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
module Pxpay
|
2
2
|
# The return notification from Payment Express
|
3
3
|
class Notification
|
4
|
-
mattr_accessor :order_details
|
5
4
|
attr_accessor :response
|
6
|
-
|
5
|
+
# Create a new Notification from Payment Express' response
|
7
6
|
def initialize(response)
|
8
7
|
@response = response
|
9
8
|
end
|
@@ -16,7 +15,7 @@ module Pxpay
|
|
16
15
|
# Return the response as a hash
|
17
16
|
def to_hash
|
18
17
|
require 'nokogiri'
|
19
|
-
doc = Nokogiri::XML(self.response)
|
18
|
+
doc = ::Nokogiri::XML( self.response )
|
20
19
|
hash = {}
|
21
20
|
doc.at_css("Response").element_children.each do |attribute|
|
22
21
|
hash[attribute.name.underscore.to_sym] = attribute.inner_text
|
@@ -25,4 +24,15 @@ module Pxpay
|
|
25
24
|
hash
|
26
25
|
end
|
27
26
|
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class String
|
30
|
+
# A copy of Rails' ActiveSupport underscore method
|
31
|
+
def underscore
|
32
|
+
self.gsub(/::/, '/').
|
33
|
+
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
34
|
+
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
35
|
+
tr("-", "_").
|
36
|
+
downcase
|
37
|
+
end
|
28
38
|
end
|
data/lib/pxpay/request.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
module Pxpay
|
2
|
+
# The request object to send to Payment Express
|
2
3
|
class Request
|
3
4
|
|
4
5
|
attr_accessor :post
|
@@ -17,26 +18,27 @@ module Pxpay
|
|
17
18
|
# Get the redirect URL from Payment Express
|
18
19
|
def url
|
19
20
|
require 'rest_client'
|
21
|
+
require 'nokogiri'
|
20
22
|
response = ::RestClient.post("https://sec2.paymentexpress.com/pxpay/pxaccess.aspx", post )
|
21
|
-
url =
|
23
|
+
url = ::Nokogiri::XML(response).at_css("URI").inner_html
|
22
24
|
return URI::extract(url).first.gsub("&", "&")
|
23
25
|
end
|
24
26
|
|
25
27
|
private
|
26
28
|
# Internal method to build the xml to send to Payment Express
|
27
29
|
def build_xml( id, price, options )
|
28
|
-
xml = Builder::XmlMarkup.new
|
30
|
+
xml = ::Builder::XmlMarkup.new
|
29
31
|
xml.GenerateRequest do
|
30
|
-
xml.PxPayUserId PXPAY_CONFIG[:pxpay][:pxpay_user_id]
|
31
|
-
xml.PxPayKey PXPAY_CONFIG[:pxpay][:pxpay_key]
|
32
|
+
xml.PxPayUserId ::PXPAY_CONFIG[:pxpay][:pxpay_user_id]
|
33
|
+
xml.PxPayKey ::PXPAY_CONFIG[:pxpay][:pxpay_key]
|
32
34
|
xml.AmountInput sprintf("%.2f", price)
|
33
35
|
xml.CurrencyInput options[:currency] || "NZD"
|
34
36
|
xml.MerchantReference options[:reference] || id.to_s
|
35
37
|
xml.EmailAddress options[:email]
|
36
38
|
xml.TxnType "Purchase"
|
37
39
|
xml.TxnId id
|
38
|
-
xml.UrlSuccess PXPAY_CONFIG[:pxpay][:success_url]
|
39
|
-
xml.UrlFail PXPAY_CONFIG[:pxpay][:failure_url]
|
40
|
+
xml.UrlSuccess ::PXPAY_CONFIG[:pxpay][:success_url]
|
41
|
+
xml.UrlFail ::PXPAY_CONFIG[:pxpay][:failure_url]
|
40
42
|
end
|
41
43
|
end
|
42
44
|
end
|
data/lib/pxpay/response.rb
CHANGED
@@ -1,22 +1,27 @@
|
|
1
1
|
module Pxpay
|
2
|
+
# The response object received from Payment Express
|
2
3
|
class Response
|
3
|
-
attr_accessor :
|
4
|
+
attr_accessor :post
|
5
|
+
|
6
|
+
# Create a new Payment Express response object by passing in the return parameters provided to the success/failure URL
|
7
|
+
|
4
8
|
def initialize(params)
|
5
9
|
@result = params[:result]
|
6
10
|
@user_id = params[:userid]
|
11
|
+
@post = build_xml( params[:result] )
|
7
12
|
end
|
8
13
|
|
9
14
|
# Retrieving the transaction details from Payment Express as an instance of Pxpay::Notification
|
10
15
|
def response
|
11
16
|
require 'rest_client'
|
12
|
-
response = ::RestClient.post( 'https://www.paymentexpress.com/pxpay/pxaccess.aspx',
|
17
|
+
response = ::RestClient.post( 'https://www.paymentexpress.com/pxpay/pxaccess.aspx', self.post )
|
13
18
|
return ::Pxpay::Notification.new( response )
|
14
19
|
end
|
15
20
|
|
16
21
|
private
|
17
22
|
# Internal method to build the xml to send to Payment Express
|
18
23
|
def build_xml( result )
|
19
|
-
xml = Builder::XmlMarkup.new
|
24
|
+
xml = ::Builder::XmlMarkup.new
|
20
25
|
|
21
26
|
xml.ProcessResponse do
|
22
27
|
xml.PxPayUserId PXPAY_CONFIG[:pxpay][:pxpay_user_id]
|
data/pxpay.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{pxpay}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bradley Priest"]
|
@@ -32,10 +32,11 @@ Gem::Specification.new do |s|
|
|
32
32
|
"lib/pxpay/railtie.rb",
|
33
33
|
"lib/pxpay/request.rb",
|
34
34
|
"lib/pxpay/response.rb",
|
35
|
-
"lib/pxpay/templates/pxpay.rb",
|
36
35
|
"lib/pxpay/templates/pxpay.yml",
|
37
36
|
"pxpay.gemspec",
|
38
37
|
"test/helper.rb",
|
38
|
+
"test/pxpay.yml",
|
39
|
+
"test/response.xml",
|
39
40
|
"test/test_pxpay.rb"
|
40
41
|
]
|
41
42
|
s.homepage = %q{http://github.com/bradleypriest/pxpay}
|
@@ -53,33 +54,39 @@ Gem::Specification.new do |s|
|
|
53
54
|
s.specification_version = 3
|
54
55
|
|
55
56
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
56
|
-
s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
|
57
|
-
s.add_runtime_dependency(%q<rest-client>, [">= 0"])
|
58
57
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
59
58
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
60
59
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
61
60
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
61
|
+
s.add_development_dependency(%q<builder>, [">= 0"])
|
62
|
+
s.add_development_dependency(%q<nokogiri>, [">= 0"])
|
63
|
+
s.add_development_dependency(%q<rest-client>, [">= 0"])
|
62
64
|
s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
|
63
65
|
s.add_runtime_dependency(%q<rest-client>, [">= 0"])
|
66
|
+
s.add_runtime_dependency(%q<builder>, [">= 0"])
|
64
67
|
else
|
65
|
-
s.add_dependency(%q<nokogiri>, [">= 0"])
|
66
|
-
s.add_dependency(%q<rest-client>, [">= 0"])
|
67
68
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
68
69
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
69
70
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
70
71
|
s.add_dependency(%q<rcov>, [">= 0"])
|
72
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
73
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
74
|
+
s.add_dependency(%q<rest-client>, [">= 0"])
|
71
75
|
s.add_dependency(%q<nokogiri>, [">= 0"])
|
72
76
|
s.add_dependency(%q<rest-client>, [">= 0"])
|
77
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
73
78
|
end
|
74
79
|
else
|
75
|
-
s.add_dependency(%q<nokogiri>, [">= 0"])
|
76
|
-
s.add_dependency(%q<rest-client>, [">= 0"])
|
77
80
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
78
81
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
79
82
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
80
83
|
s.add_dependency(%q<rcov>, [">= 0"])
|
84
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
85
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
86
|
+
s.add_dependency(%q<rest-client>, [">= 0"])
|
81
87
|
s.add_dependency(%q<nokogiri>, [">= 0"])
|
82
88
|
s.add_dependency(%q<rest-client>, [">= 0"])
|
89
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
83
90
|
end
|
84
91
|
end
|
85
92
|
|
data/test/helper.rb
CHANGED
@@ -9,10 +9,13 @@ rescue Bundler::BundlerError => e
|
|
9
9
|
end
|
10
10
|
require 'test/unit'
|
11
11
|
require 'shoulda'
|
12
|
+
require 'builder'
|
12
13
|
|
13
14
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
15
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
16
|
require 'pxpay'
|
17
|
+
PXPAY_CONFIG = YAML.load_file("test/pxpay.yml")['test']
|
18
|
+
|
16
19
|
|
17
20
|
class Test::Unit::TestCase
|
18
21
|
end
|
data/test/pxpay.yml
ADDED
data/test/response.xml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
<Response valid="1"><Success>1</Success><TxnType>Purchase</TxnType><CurrencyInput>NZD</CurrencyInput><MerchantReference>1</MerchantReference><TxnData1></TxnData1><TxnData2></TxnData2><TxnData3></TxnData3><AuthCode>222330</AuthCode><CardName>Visa</CardName><CardHolderName>123</CardHolderName><CardNumber>411111........11</CardNumber><DateExpiry>1212</DateExpiry><ClientInfo>202.180.88.16</ClientInfo><TxnId>1</TxnId><EmailAddress></EmailAddress><DpsTxnRef>00000006070485ce</DpsTxnRef><BillingId></BillingId><DpsBillingId></DpsBillingId><AmountSettlement>12.00</AmountSettlement><CurrencySettlement>NZD</CurrencySettlement><DateSettlement>20110309</DateSettlement><TxnMac>BD43E619</TxnMac><ResponseText>APPROVED</ResponseText><CardNumber2></CardNumber2></Response>
|
data/test/test_pxpay.rb
CHANGED
@@ -1,7 +1,60 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
3
|
class TestPxpay < Test::Unit::TestCase
|
4
|
-
|
5
|
-
|
4
|
+
context "create a request object" do
|
5
|
+
setup do
|
6
|
+
@request = Pxpay::Request.new( 1, 12.34 )
|
7
|
+
end
|
8
|
+
|
9
|
+
should "generate an xml request" do
|
10
|
+
assert_match(/GenerateRequest/, @request.post )
|
11
|
+
end
|
12
|
+
|
13
|
+
should "generate an xml request with username and id" do
|
14
|
+
assert_match(/<PxPayUserId>Test_Dev<\/PxPayUserId><PxPayKey>\w{64}<\/PxPayKey>/, @request.post )
|
15
|
+
end
|
16
|
+
|
17
|
+
should "generate an xml request with correct amount" do
|
18
|
+
assert_match(/<AmountInput>12.34<\/AmountInput>/, @request.post)
|
19
|
+
end
|
20
|
+
|
21
|
+
should "return a URL" do
|
22
|
+
assert_match(/https:\/\/sec2.paymentexpress.com\/pxpay\/pxpay.aspx\?userid=\w{64}&request=\S{270}/, @request.url)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "create a response object" do
|
27
|
+
setup do
|
28
|
+
@response_text = "v5l4alYudyoKcCD1vSADyfiuWv4QqCKyJVdaXCuJR0_7jUyj9reTWi7Jdhe5-xtbDRlwLpPG56qO7AOKR-h65Awaa886kw9vjf5YglO1fz2wyyshMsaJT5XrEhGFBsNLycaqou0rxwRxF4Y0chcA_laRn8Ev1sOqpNNXafUwP2fDMQVQ7gla11Ibdv7K5v0TIvV28rPVLZgnbty5rtnK_AdR0W9XOXpo6w4NlNzh81KcFJeVc_5n_4QITRZ1zVYrrCGzg3T3S902ej1kgqBGGJf904IWEgNfbjc8teg3ereUWLYhDK-E3FrP-v3L06VxRwR96wZkkO2rucYUrxc2drOQfZipqijabZTRjyoLK37jFQkg5JfrQPOvXZaQeY6eby2Voh_XLAYtoUawPPvkupiEI3b5_TlANhnOLl0_fUS95ObLG1VIHenw=="
|
29
|
+
@response = Pxpay::Response.new(:userid => 'Test_Dev', :result => @response_text )
|
30
|
+
end
|
31
|
+
|
32
|
+
should "generate an xml request" do
|
33
|
+
assert_match(/ProcessResponse/, @response.post )
|
34
|
+
end
|
35
|
+
|
36
|
+
should "generate an xml request with username and id" do
|
37
|
+
assert_match(/<PxPayUserId>#{PXPAY_CONFIG[:pxpay_user_id]}<\/PxPayUserId><PxPayKey>#{PXPAY_CONFIG[:pxpay_key]}<\/PxPayKey>/, @response.post )
|
38
|
+
end
|
39
|
+
|
40
|
+
should "generate an xml request with the correct response text" do
|
41
|
+
assert_match( %r(<Response>#{@response_text}</Response), @response.post)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
context "create a notification" do
|
46
|
+
setup do
|
47
|
+
@notification = Pxpay::Notification.new( File.read('test/response.xml') )
|
48
|
+
end
|
49
|
+
|
50
|
+
should "parse xml to hash" do
|
51
|
+
assert_instance_of(Hash, @notification.to_hash )
|
52
|
+
end
|
53
|
+
|
54
|
+
should "return info in hash" do
|
55
|
+
assert_match(@notification.to_hash[:success], "1")
|
56
|
+
assert_match(@notification.to_hash[:valid], "1")
|
57
|
+
assert_match(@notification.to_hash[:amount_settlement], "12.00")
|
58
|
+
end
|
6
59
|
end
|
7
60
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Bradley Priest
|
@@ -18,7 +18,7 @@ date: 2011-03-13 00:00:00 +13:00
|
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
21
|
+
name: shoulda
|
22
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
23
|
none: false
|
24
24
|
requirements:
|
@@ -27,67 +27,67 @@ dependencies:
|
|
27
27
|
segments:
|
28
28
|
- 0
|
29
29
|
version: "0"
|
30
|
-
type: :
|
30
|
+
type: :development
|
31
31
|
prerelease: false
|
32
32
|
version_requirements: *id001
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: bundler
|
35
35
|
requirement: &id002 !ruby/object:Gem::Requirement
|
36
36
|
none: false
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
segments:
|
41
|
+
- 1
|
41
42
|
- 0
|
42
|
-
|
43
|
-
|
43
|
+
- 0
|
44
|
+
version: 1.0.0
|
45
|
+
type: :development
|
44
46
|
prerelease: false
|
45
47
|
version_requirements: *id002
|
46
48
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
49
|
+
name: jeweler
|
48
50
|
requirement: &id003 !ruby/object:Gem::Requirement
|
49
51
|
none: false
|
50
52
|
requirements:
|
51
|
-
- -
|
53
|
+
- - ~>
|
52
54
|
- !ruby/object:Gem::Version
|
53
55
|
segments:
|
54
|
-
-
|
55
|
-
|
56
|
+
- 1
|
57
|
+
- 5
|
58
|
+
- 2
|
59
|
+
version: 1.5.2
|
56
60
|
type: :development
|
57
61
|
prerelease: false
|
58
62
|
version_requirements: *id003
|
59
63
|
- !ruby/object:Gem::Dependency
|
60
|
-
name:
|
64
|
+
name: rcov
|
61
65
|
requirement: &id004 !ruby/object:Gem::Requirement
|
62
66
|
none: false
|
63
67
|
requirements:
|
64
|
-
- -
|
68
|
+
- - ">="
|
65
69
|
- !ruby/object:Gem::Version
|
66
70
|
segments:
|
67
|
-
- 1
|
68
71
|
- 0
|
69
|
-
|
70
|
-
version: 1.0.0
|
72
|
+
version: "0"
|
71
73
|
type: :development
|
72
74
|
prerelease: false
|
73
75
|
version_requirements: *id004
|
74
76
|
- !ruby/object:Gem::Dependency
|
75
|
-
name:
|
77
|
+
name: builder
|
76
78
|
requirement: &id005 !ruby/object:Gem::Requirement
|
77
79
|
none: false
|
78
80
|
requirements:
|
79
|
-
- -
|
81
|
+
- - ">="
|
80
82
|
- !ruby/object:Gem::Version
|
81
83
|
segments:
|
82
|
-
-
|
83
|
-
|
84
|
-
- 2
|
85
|
-
version: 1.5.2
|
84
|
+
- 0
|
85
|
+
version: "0"
|
86
86
|
type: :development
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: *id005
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
90
|
+
name: nokogiri
|
91
91
|
requirement: &id006 !ruby/object:Gem::Requirement
|
92
92
|
none: false
|
93
93
|
requirements:
|
@@ -100,7 +100,7 @@ dependencies:
|
|
100
100
|
prerelease: false
|
101
101
|
version_requirements: *id006
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
|
-
name:
|
103
|
+
name: rest-client
|
104
104
|
requirement: &id007 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
@@ -109,11 +109,11 @@ dependencies:
|
|
109
109
|
segments:
|
110
110
|
- 0
|
111
111
|
version: "0"
|
112
|
-
type: :
|
112
|
+
type: :development
|
113
113
|
prerelease: false
|
114
114
|
version_requirements: *id007
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
|
-
name:
|
116
|
+
name: nokogiri
|
117
117
|
requirement: &id008 !ruby/object:Gem::Requirement
|
118
118
|
none: false
|
119
119
|
requirements:
|
@@ -125,6 +125,32 @@ dependencies:
|
|
125
125
|
type: :runtime
|
126
126
|
prerelease: false
|
127
127
|
version_requirements: *id008
|
128
|
+
- !ruby/object:Gem::Dependency
|
129
|
+
name: rest-client
|
130
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
segments:
|
136
|
+
- 0
|
137
|
+
version: "0"
|
138
|
+
type: :runtime
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: *id009
|
141
|
+
- !ruby/object:Gem::Dependency
|
142
|
+
name: builder
|
143
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
144
|
+
none: false
|
145
|
+
requirements:
|
146
|
+
- - ">="
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
segments:
|
149
|
+
- 0
|
150
|
+
version: "0"
|
151
|
+
type: :runtime
|
152
|
+
prerelease: false
|
153
|
+
version_requirements: *id010
|
128
154
|
description: A Ruby wrapper around the DPS-hosted PxPay service
|
129
155
|
email: bradleypriest@gmail.com
|
130
156
|
executables: []
|
@@ -150,10 +176,11 @@ files:
|
|
150
176
|
- lib/pxpay/railtie.rb
|
151
177
|
- lib/pxpay/request.rb
|
152
178
|
- lib/pxpay/response.rb
|
153
|
-
- lib/pxpay/templates/pxpay.rb
|
154
179
|
- lib/pxpay/templates/pxpay.yml
|
155
180
|
- pxpay.gemspec
|
156
181
|
- test/helper.rb
|
182
|
+
- test/pxpay.yml
|
183
|
+
- test/response.xml
|
157
184
|
- test/test_pxpay.rb
|
158
185
|
has_rdoc: true
|
159
186
|
homepage: http://github.com/bradleypriest/pxpay
|
@@ -169,7 +196,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
196
|
requirements:
|
170
197
|
- - ">="
|
171
198
|
- !ruby/object:Gem::Version
|
172
|
-
hash:
|
199
|
+
hash: 1867572891445724982
|
173
200
|
segments:
|
174
201
|
- 0
|
175
202
|
version: "0"
|
File without changes
|