Module: CompletePaymentSystems
- Defined in:
- lib/complete_payment_systems.rb,
lib/complete_payment_systems/version.rb,
lib/complete_payment_systems/request_processing.rb,
lib/complete_payment_systems/response_processing.rb
Defined Under Namespace
Classes: Config, Request, Response
Constant Summary collapse
- CPS =
CompletePaymentSystems- ROOT =
File.("../..", __FILE__)
- VERSION =
"0.0.4"
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
22 23 24 |
# File 'lib/complete_payment_systems.rb', line 22 def config @config end |
Class Method Details
.configure {|config| ... } ⇒ Object
25 26 27 28 |
# File 'lib/complete_payment_systems.rb', line 25 def self.configure self.config ||= Config.new yield(config) end |
.return_test_instance ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/complete_payment_systems.rb', line 55 def self.return_test_instance hash = { order: (Time.now.to_i), # Pass the unique purchase ID here value: "166", # Pass the purchase value in cents here (1$ purcase value = 100) currency: "USD", # Pass the purchase currency 3-letter code here ($ = "USD") holder_name: "John", # Ask buyer for this in a form holder_surname: "Doe", # Ask buyer for this in a form card_number: "4314229999999913", # Ask buyer for this in a form card_exp: "01/18", # Ask buyer for this in a form card_cvv: "123", # Ask buyer for this in a form holder_ip: "123.124.125.226" # Get this from request.remote_ip } return CPS::Request.new(hash) end |