pxpay 0.1.8 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,6 +2,10 @@ PxPay
2
2
  =======
3
3
  A Rubygem to integrate DPS-hosted payments through the Payment Express PxPay system.
4
4
 
5
+ Notice:
6
+ -------
7
+ The upgrade from 0.1.3 - 0.2.0 is not backwards compatible. It has changed from a yml file to variables for config
8
+
5
9
  For self-hosted systems check out the amazing [ActiveMerchant](https://www.github.com/Shopify/active_merchant) gem.
6
10
 
7
11
  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.
@@ -11,7 +15,7 @@ Installation
11
15
  Install from Rubygems
12
16
  gem install pxpay
13
17
  Then run `rails generate pxpay:install` to copy an initializer and a config yml file to your rails app.
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
18
+ Make sure you add your own development credentials to the `config/initializers/pxpay.rb` file and create success and failure URLs for Payment Express to redirect you back.
15
19
  You can apply for a development account at <https://www.paymentexpress.com/pxmi/apply>
16
20
 
17
21
 
@@ -22,17 +26,17 @@ Usage
22
26
  >> request = Pxpay::Request.new( 1, 12.00 )
23
27
  => #<Pxpay::Request:0x00000101c9a840 >
24
28
  >> request.url
25
- => "https://sec2.paymentexpress.com/pxpay/pxpay.aspx?userid=Fake_Dev&request=xxxxxxxxxx"
29
+ => "https://sec2.paymentexpress.com/pxpay/pxpay.aspx?userid=Fake_Dev&request=xxxxxxxxxx"
26
30
 
27
31
 
28
32
  To send your customer to Payment Express for payment make a call to Pxpay::Request to request a redirection URL
29
-
33
+
30
34
  def create
31
35
  request = Pxpay::Request.new( id , price, options )
32
36
  redirect_to request.url
33
37
  end
34
-
35
- Once your customer has entered their details Payment Express will redirect them back to the success URL that you provided.
38
+
39
+ Once your customer has entered their details Payment Express will redirect them back to the success URL that you provided.
36
40
 
37
41
  Use Pxpay:Response to get the transaction details back from Payment Express.
38
42
 
@@ -41,11 +45,13 @@ Use Pxpay:Response to get the transaction details back from Payment Express.
41
45
  hash = response.to_hash
42
46
  ## Do something with the results hash
43
47
  end
44
-
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.
48
+
49
+ 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.
46
50
 
47
51
  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.
48
52
 
53
+
54
+ Token Billing can be implemented by setting `:token_billing => true` inside the Request option hash.
49
55
  N.B.
50
56
  ----
51
57
 
@@ -55,10 +61,10 @@ TODO
55
61
  ----
56
62
  * Add ability to set global configuration options
57
63
  * Add more tests
58
- * Token Billing
64
+ * Add support for optional text fields
59
65
 
60
66
  Contributing to PxPay
61
- =====================
67
+ =====================
62
68
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
63
69
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
64
70
  * Fork the project
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.8
1
+ 0.2.0
data/lib/pxpay.rb CHANGED
@@ -5,4 +5,5 @@ module Pxpay
5
5
  require "pxpay/request"
6
6
  require "pxpay/response"
7
7
  require "pxpay/notification"
8
+ require "pxpay/error"
8
9
  end
data/lib/pxpay/base.rb CHANGED
@@ -10,6 +10,10 @@ module Pxpay
10
10
  # The currently returned details from Payment Express. Access with Pxpay::Base.return_details
11
11
  def self.return_details
12
12
  [ :dps_billing_id, :txn_data1, :success, :card_number2, :email_address, :card_number, :amount_settlement, :txn_data2, :client_info, :date_expiry, :currency_settlement, :txn_data3, :txn_id, :txn_type, :date_settlement, :auth_code, :dps_txn_ref, :currency_input, :txn_mac, :card_name, :billing_id, :merchant_reference, :response_text, :card_holder_name ]
13
- end
13
+ end
14
+
15
+ class << self
16
+ attr_accessor :pxpay_user_id, :pxpay_key, :success_url, :failure_url
17
+ end
14
18
  end
15
19
  end
@@ -0,0 +1,6 @@
1
+ module Pxpay
2
+ class Error < StandardError
3
+ end
4
+ class MissingKey < Pxpay::Error
5
+ end
6
+ end
@@ -6,7 +6,7 @@ module Pxpay
6
6
  source_root File.expand_path('../templates', __FILE__)
7
7
 
8
8
  def copy_files
9
- template 'pxpay.yml' ,'config/pxpay.yml'
9
+ template 'pxpay.rb' ,'config/initializers/pxpay.rb'
10
10
  end
11
11
 
12
12
  end
@@ -1,6 +1,7 @@
1
1
  module Pxpay
2
2
  # The return notification from Payment Express
3
3
  class Notification
4
+ require 'nokogiri'
4
5
  attr_accessor :response
5
6
  # Create a new Notification from Payment Express' response
6
7
  def initialize(response)
@@ -14,7 +15,6 @@ module Pxpay
14
15
 
15
16
  # Return the response as a hash
16
17
  def to_hash
17
- require 'nokogiri'
18
18
  doc = ::Nokogiri::XML( self.response )
19
19
  hash = {}
20
20
  doc.at_css("Response").element_children.each do |attribute|
@@ -29,10 +29,10 @@ end
29
29
  class String
30
30
  # A copy of Rails' ActiveSupport underscore method
31
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
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
37
  end
38
38
  end
data/lib/pxpay/railtie.rb CHANGED
@@ -5,8 +5,5 @@ module Pxpay
5
5
  generators do
6
6
  require 'pxpay/install_generator'
7
7
  end
8
- initializer "railtie.configure_rails_initialization" do
9
- require 'pxpay/init'
10
- end
11
8
  end
12
9
  end
data/lib/pxpay/request.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  module Pxpay
2
2
  # The request object to send to Payment Express
3
3
  class Request
4
+ require 'pxpay/error'
5
+ require 'rest_client'
6
+ require 'nokogiri'
7
+ require 'builder'
4
8
 
5
9
  attr_accessor :post
6
10
 
@@ -8,8 +12,11 @@ module Pxpay
8
12
  # Pxpay::Request.new( id, amount, options = {} )
9
13
  # Current available options are:
10
14
  # :currency, currency for transaction, default is NZD, can be any of Pxpay::Base.currency_types
11
- # :reference, a reference field, default is the id
12
- # :email, email address of user, default is nil
15
+ # :reference, a reference field, default is the id.
16
+ # :email, email address of user, default is nil.
17
+ # :token_billing, boolean value, set to true to enable token billing.
18
+ # :billing_id, optional billing_id field only used if token_billing is set to true.
19
+ # :txn_type, can be set to :auth for Auth transaction, defaults to Purchase
13
20
 
14
21
  def initialize( id , price, options = {} )
15
22
  @post = build_xml( id, price, options )
@@ -17,10 +24,17 @@ module Pxpay
17
24
 
18
25
  # Get the redirect URL from Payment Express
19
26
  def url
20
- require 'rest_client'
21
- require 'nokogiri'
22
- response = ::RestClient.post("https://sec.paymentexpress.com/pxpay/pxaccess.aspx", post )
23
- url = ::Nokogiri::XML(response).at_css("URI").inner_html
27
+ response = ::RestClient.post("https://sec2.paymentexpress.com/pxpay/pxaccess.aspx", post )
28
+ response_text = ::Nokogiri::XML(response)
29
+ if response_text.at_css("Request").attributes["valid"].value == "1"
30
+ url = response_text.at_css("URI").inner_html
31
+ else
32
+ if Pxpay::Base.pxpay_user_id
33
+ raise Pxpay::Error, response_text.at_css("Request").inner_html
34
+ else
35
+ raise Pxpay::MissingKey, "Your Pxpay config is not set up properly, run rails generate pxpay:install"
36
+ end
37
+ end
24
38
  return URI::extract(url).first.gsub("&amp;", "&")
25
39
  end
26
40
 
@@ -29,16 +43,18 @@ module Pxpay
29
43
  def build_xml( id, price, options )
30
44
  xml = ::Builder::XmlMarkup.new
31
45
  xml.GenerateRequest do
32
- xml.PxPayUserId ::PXPAY_CONFIG[:pxpay][:pxpay_user_id]
33
- xml.PxPayKey ::PXPAY_CONFIG[:pxpay][:pxpay_key]
46
+ xml.PxPayUserId ::Pxpay::Base.pxpay_user_id
47
+ xml.PxPayKey ::Pxpay::Base.pxpay_key
34
48
  xml.AmountInput sprintf("%.2f", price)
35
49
  xml.CurrencyInput options[:currency] || "NZD"
36
50
  xml.MerchantReference options[:reference] || id.to_s
37
51
  xml.EmailAddress options[:email]
38
- xml.TxnType "Purchase"
52
+ xml.TxnType options[:txn_type] ? options[:txn_type].to_s.capitalize : "Purchase"
39
53
  xml.TxnId id
40
- xml.UrlSuccess ::PXPAY_CONFIG[:pxpay][:success_url]
41
- xml.UrlFail ::PXPAY_CONFIG[:pxpay][:failure_url]
54
+ xml.UrlSuccess ::Pxpay::Base.success_url
55
+ xml.UrlFail ::Pxpay::Base.failure_url
56
+ xml.EnableAddBillCard 1 if options[:token_billing]
57
+ xml.BillingId options[:billing_id] if options[:token_billing]
42
58
  end
43
59
  end
44
60
  end
@@ -1,31 +1,32 @@
1
1
  module Pxpay
2
2
  # The response object received from Payment Express
3
3
  class Response
4
+ require 'rest_client'
5
+ require 'builder'
4
6
  attr_accessor :post
5
-
7
+
6
8
  # Create a new Payment Express response object by passing in the return parameters provided to the success/failure URL
7
-
9
+
8
10
  def initialize(params)
9
11
  @result = params[:result]
10
12
  @user_id = params[:userid]
11
13
  @post = build_xml( params[:result] )
12
14
  end
13
-
15
+
14
16
  # Retrieving the transaction details from Payment Express as an instance of Pxpay::Notification
15
17
  def response
16
- require 'rest_client'
17
- response = ::RestClient.post( "https://sec.paymentexpress.com/pxpay/pxaccess.aspx", self.post )
18
+ response = ::RestClient.post( 'https://www.paymentexpress.com/pxpay/pxaccess.aspx', self.post )
18
19
  return ::Pxpay::Notification.new( response )
19
20
  end
20
-
21
+
21
22
  private
22
23
  # Internal method to build the xml to send to Payment Express
23
24
  def build_xml( result )
24
25
  xml = ::Builder::XmlMarkup.new
25
-
26
- xml.ProcessResponse do
27
- xml.PxPayUserId PXPAY_CONFIG[:pxpay][:pxpay_user_id]
28
- xml.PxPayKey PXPAY_CONFIG[:pxpay][:pxpay_key]
26
+
27
+ xml.ProcessResponse do
28
+ xml.PxPayUserId ::Pxpay::Base.pxpay_user_id
29
+ xml.PxPayKey ::Pxpay::Base.pxpay_key
29
30
  xml.Response result
30
31
  end
31
32
  end
@@ -0,0 +1,11 @@
1
+ ## Configuration for the PxPay gem for Payment Express
2
+
3
+ # Your Pxpay UserID and Key
4
+ Pxpay::Base.pxpay_user_id = 'ExampleUser'
5
+ Pxpay::Base.pxpay_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
6
+
7
+ # Return Endpoints for payment confirmation
8
+ Pxpay::Base.success_url = 'http://localhost:3000/success'
9
+ Pxpay::Base.failure_url = 'http://localhost:3000/failure'
10
+
11
+ # Coming Soon Global Variables
data/pxpay.gemspec CHANGED
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = "pxpay"
8
- s.version = "0.1.8"
7
+ s.name = %q{pxpay}
8
+ s.version = "0.2.0"
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"]
12
- s.date = "2011-11-27"
13
- s.description = "A Ruby wrapper around the DPS-hosted PxPay service"
14
- s.email = "bradleypriest@gmail.com"
12
+ s.date = %q{2011-04-20}
13
+ s.description = %q{A Ruby wrapper around the DPS-hosted PxPay service}
14
+ s.email = %q{bradleypriest@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
17
  "README.md"
@@ -26,30 +26,30 @@ Gem::Specification.new do |s|
26
26
  "VERSION",
27
27
  "lib/pxpay.rb",
28
28
  "lib/pxpay/base.rb",
29
- "lib/pxpay/init.rb",
29
+ "lib/pxpay/error.rb",
30
30
  "lib/pxpay/install_generator.rb",
31
31
  "lib/pxpay/notification.rb",
32
32
  "lib/pxpay/railtie.rb",
33
33
  "lib/pxpay/request.rb",
34
34
  "lib/pxpay/response.rb",
35
- "lib/pxpay/templates/pxpay.yml",
35
+ "lib/pxpay/templates/pxpay.rb",
36
36
  "pxpay.gemspec",
37
37
  "test/helper.rb",
38
- "test/pxpay.yml",
39
38
  "test/response.xml",
40
39
  "test/test_pxpay.rb"
41
40
  ]
42
- s.homepage = "http://github.com/bradleypriest/pxpay"
41
+ s.homepage = %q{http://github.com/bradleypriest/pxpay}
43
42
  s.licenses = ["MIT"]
44
43
  s.require_paths = ["lib"]
45
- s.rubygems_version = "1.8.10"
46
- s.summary = "Ruby wrapper for the Payment Express' PxPay API"
44
+ s.rubygems_version = %q{1.3.7}
45
+ s.summary = %q{Ruby wrapper for the Payment Express' PxPay API}
47
46
  s.test_files = [
48
47
  "test/helper.rb",
49
48
  "test/test_pxpay.rb"
50
49
  ]
51
50
 
52
51
  if s.respond_to? :specification_version then
52
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
53
53
  s.specification_version = 3
54
54
 
55
55
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
data/test/helper.rb CHANGED
@@ -14,8 +14,12 @@ require 'builder'
14
14
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
15
15
  $LOAD_PATH.unshift(File.dirname(__FILE__))
16
16
  require 'pxpay'
17
- PXPAY_CONFIG = YAML.load_file("test/pxpay.yml")['test']
17
+ require 'rest_client'
18
18
 
19
+ Pxpay::Base.pxpay_user_id = 'Test_Dev'
20
+ Pxpay::Base.pxpay_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
21
+ Pxpay::Base.success_url = 'http://localhost:3000/success'
22
+ Pxpay::Base.failure_url = 'http://localhost:3000/failure'
19
23
 
20
24
  class Test::Unit::TestCase
21
25
  end
data/test/test_pxpay.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'helper'
2
2
 
3
+
3
4
  class TestPxpay < Test::Unit::TestCase
4
5
  context "create a request object" do
5
6
  setup do
@@ -18,9 +19,9 @@ class TestPxpay < Test::Unit::TestCase
18
19
  assert_match(/<AmountInput>12.34<\/AmountInput>/, @request.post)
19
20
  end
20
21
 
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
22
+ # should "return a URL" do
23
+ # assert_match(/https:\/\/sec2.paymentexpress.com\/pxpay\/pxpay.aspx\?userid=\w{64}&request=\S{270}/, @request.url)
24
+ # end
24
25
  end
25
26
 
26
27
  context "create a response object" do
@@ -34,7 +35,7 @@ class TestPxpay < Test::Unit::TestCase
34
35
  end
35
36
 
36
37
  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
+ assert_match(/<PxPayUserId>#{Pxpay::Base.pxpay_user_id}<\/PxPayUserId><PxPayKey>#{Pxpay::Base.pxpay_key}<\/PxPayKey>/, @response.post )
38
39
  end
39
40
 
40
41
  should "generate an xml request with the correct response text" do
metadata CHANGED
@@ -1,134 +1,166 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: pxpay
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.8
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 2
8
+ - 0
9
+ version: 0.2.0
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Bradley Priest
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2011-11-27 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2011-04-20 00:00:00 +12:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: shoulda
16
- requirement: &70283730098120 !ruby/object:Gem::Requirement
22
+ requirement: &id001 !ruby/object:Gem::Requirement
17
23
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
22
30
  type: :development
23
31
  prerelease: false
24
- version_requirements: *70283730098120
25
- - !ruby/object:Gem::Dependency
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
26
34
  name: bundler
27
- requirement: &70283730112860 !ruby/object:Gem::Requirement
35
+ requirement: &id002 !ruby/object:Gem::Requirement
28
36
  none: false
29
- requirements:
37
+ requirements:
30
38
  - - ~>
31
- - !ruby/object:Gem::Version
39
+ - !ruby/object:Gem::Version
40
+ segments:
41
+ - 1
42
+ - 0
43
+ - 0
32
44
  version: 1.0.0
33
45
  type: :development
34
46
  prerelease: false
35
- version_requirements: *70283730112860
36
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
37
49
  name: jeweler
38
- requirement: &70283730111880 !ruby/object:Gem::Requirement
50
+ requirement: &id003 !ruby/object:Gem::Requirement
39
51
  none: false
40
- requirements:
52
+ requirements:
41
53
  - - ~>
42
- - !ruby/object:Gem::Version
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 1
57
+ - 5
58
+ - 2
43
59
  version: 1.5.2
44
60
  type: :development
45
61
  prerelease: false
46
- version_requirements: *70283730111880
47
- - !ruby/object:Gem::Dependency
62
+ version_requirements: *id003
63
+ - !ruby/object:Gem::Dependency
48
64
  name: rcov
49
- requirement: &70283730110620 !ruby/object:Gem::Requirement
65
+ requirement: &id004 !ruby/object:Gem::Requirement
50
66
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ segments:
71
+ - 0
72
+ version: "0"
55
73
  type: :development
56
74
  prerelease: false
57
- version_requirements: *70283730110620
58
- - !ruby/object:Gem::Dependency
75
+ version_requirements: *id004
76
+ - !ruby/object:Gem::Dependency
59
77
  name: builder
60
- requirement: &70283730108680 !ruby/object:Gem::Requirement
78
+ requirement: &id005 !ruby/object:Gem::Requirement
61
79
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ segments:
84
+ - 0
85
+ version: "0"
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *70283730108680
69
- - !ruby/object:Gem::Dependency
88
+ version_requirements: *id005
89
+ - !ruby/object:Gem::Dependency
70
90
  name: nokogiri
71
- requirement: &70283730106400 !ruby/object:Gem::Requirement
91
+ requirement: &id006 !ruby/object:Gem::Requirement
72
92
  none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ segments:
97
+ - 0
98
+ version: "0"
77
99
  type: :development
78
100
  prerelease: false
79
- version_requirements: *70283730106400
80
- - !ruby/object:Gem::Dependency
101
+ version_requirements: *id006
102
+ - !ruby/object:Gem::Dependency
81
103
  name: rest-client
82
- requirement: &70283730132840 !ruby/object:Gem::Requirement
104
+ requirement: &id007 !ruby/object:Gem::Requirement
83
105
  none: false
84
- requirements:
85
- - - ! '>='
86
- - !ruby/object:Gem::Version
87
- version: '0'
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ segments:
110
+ - 0
111
+ version: "0"
88
112
  type: :development
89
113
  prerelease: false
90
- version_requirements: *70283730132840
91
- - !ruby/object:Gem::Dependency
114
+ version_requirements: *id007
115
+ - !ruby/object:Gem::Dependency
92
116
  name: nokogiri
93
- requirement: &70283730131280 !ruby/object:Gem::Requirement
117
+ requirement: &id008 !ruby/object:Gem::Requirement
94
118
  none: false
95
- requirements:
96
- - - ! '>='
97
- - !ruby/object:Gem::Version
98
- version: '0'
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ segments:
123
+ - 0
124
+ version: "0"
99
125
  type: :runtime
100
126
  prerelease: false
101
- version_requirements: *70283730131280
102
- - !ruby/object:Gem::Dependency
127
+ version_requirements: *id008
128
+ - !ruby/object:Gem::Dependency
103
129
  name: rest-client
104
- requirement: &70283730129680 !ruby/object:Gem::Requirement
130
+ requirement: &id009 !ruby/object:Gem::Requirement
105
131
  none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ segments:
136
+ - 0
137
+ version: "0"
110
138
  type: :runtime
111
139
  prerelease: false
112
- version_requirements: *70283730129680
113
- - !ruby/object:Gem::Dependency
140
+ version_requirements: *id009
141
+ - !ruby/object:Gem::Dependency
114
142
  name: builder
115
- requirement: &70283730127940 !ruby/object:Gem::Requirement
143
+ requirement: &id010 !ruby/object:Gem::Requirement
116
144
  none: false
117
- requirements:
118
- - - ! '>='
119
- - !ruby/object:Gem::Version
120
- version: '0'
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ segments:
149
+ - 0
150
+ version: "0"
121
151
  type: :runtime
122
152
  prerelease: false
123
- version_requirements: *70283730127940
153
+ version_requirements: *id010
124
154
  description: A Ruby wrapper around the DPS-hosted PxPay service
125
155
  email: bradleypriest@gmail.com
126
156
  executables: []
157
+
127
158
  extensions: []
128
- extra_rdoc_files:
159
+
160
+ extra_rdoc_files:
129
161
  - LICENSE.txt
130
162
  - README.md
131
- files:
163
+ files:
132
164
  - .document
133
165
  - Gemfile
134
166
  - Gemfile.lock
@@ -138,46 +170,50 @@ files:
138
170
  - VERSION
139
171
  - lib/pxpay.rb
140
172
  - lib/pxpay/base.rb
141
- - lib/pxpay/init.rb
173
+ - lib/pxpay/error.rb
142
174
  - lib/pxpay/install_generator.rb
143
175
  - lib/pxpay/notification.rb
144
176
  - lib/pxpay/railtie.rb
145
177
  - lib/pxpay/request.rb
146
178
  - lib/pxpay/response.rb
147
- - lib/pxpay/templates/pxpay.yml
179
+ - lib/pxpay/templates/pxpay.rb
148
180
  - pxpay.gemspec
149
181
  - test/helper.rb
150
- - test/pxpay.yml
151
182
  - test/response.xml
152
183
  - test/test_pxpay.rb
184
+ has_rdoc: true
153
185
  homepage: http://github.com/bradleypriest/pxpay
154
- licenses:
186
+ licenses:
155
187
  - MIT
156
188
  post_install_message:
157
189
  rdoc_options: []
158
- require_paths:
190
+
191
+ require_paths:
159
192
  - lib
160
- required_ruby_version: !ruby/object:Gem::Requirement
193
+ required_ruby_version: !ruby/object:Gem::Requirement
161
194
  none: false
162
- requirements:
163
- - - ! '>='
164
- - !ruby/object:Gem::Version
165
- version: '0'
166
- segments:
195
+ requirements:
196
+ - - ">="
197
+ - !ruby/object:Gem::Version
198
+ hash: 617512467652124965
199
+ segments:
167
200
  - 0
168
- hash: -1395613620569097916
169
- required_rubygems_version: !ruby/object:Gem::Requirement
201
+ version: "0"
202
+ required_rubygems_version: !ruby/object:Gem::Requirement
170
203
  none: false
171
- requirements:
172
- - - ! '>='
173
- - !ruby/object:Gem::Version
174
- version: '0'
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ segments:
208
+ - 0
209
+ version: "0"
175
210
  requirements: []
211
+
176
212
  rubyforge_project:
177
- rubygems_version: 1.8.10
213
+ rubygems_version: 1.3.7
178
214
  signing_key:
179
215
  specification_version: 3
180
216
  summary: Ruby wrapper for the Payment Express' PxPay API
181
- test_files:
217
+ test_files:
182
218
  - test/helper.rb
183
219
  - test/test_pxpay.rb
data/lib/pxpay/init.rb DELETED
@@ -1,5 +0,0 @@
1
- if File.exists?("#{Rails.root}/config/pxpay.yml")
2
- PXPAY_CONFIG = YAML.load_file("#{Rails.root}/config/pxpay.yml")[Rails.env]
3
- else
4
- print "Please run rails generate pxpay:install to generate a pxpay config file"
5
- end
@@ -1,6 +0,0 @@
1
- development:
2
- :pxpay:
3
- :pxpay_user_id: Demo
4
- :pxpay_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
5
- :success_url: http://localhost:3000/success
6
- :failure_url: http://localhost:3000/failure
data/test/pxpay.yml DELETED
@@ -1,6 +0,0 @@
1
- test:
2
- :pxpay:
3
- :pxpay_user_id: TODO
4
- :pxpay_key: TODO
5
- :success_url: http://localhost:3000/success
6
- :failure_url: http://localhost:3000/failure