Class: Pxpay::Response
- Inherits:
-
Object
- Object
- Pxpay::Response
- Defined in:
- lib/pxpay/response.rb
Overview
The response object received from Payment Express
Instance Attribute Summary collapse
-
#post ⇒ Object
Returns the value of attribute post.
Instance Method Summary collapse
-
#initialize(params) ⇒ Response
constructor
Create a new Payment Express response object by passing in the return parameters provided to the success/failure URL.
-
#response ⇒ Object
Retrieving the transaction details from Payment Express as an instance of Pxpay::Notification.
Constructor Details
#initialize(params) ⇒ Response
Create a new Payment Express response object by passing in the return parameters provided to the success/failure URL
10 11 12 13 14 |
# File 'lib/pxpay/response.rb', line 10 def initialize(params) @result = params[:result] @user_id = params[:userid] @post = build_xml( params[:result] ) end |
Instance Attribute Details
#post ⇒ Object
Returns the value of attribute post.
6 7 8 |
# File 'lib/pxpay/response.rb', line 6 def post @post end |
Instance Method Details
#response ⇒ Object
Retrieving the transaction details from Payment Express as an instance of Pxpay::Notification
17 18 19 20 |
# File 'lib/pxpay/response.rb', line 17 def response response = ::RestClient.post( Pxpay::Base.pxpay_request_url, self.post ) return ::Pxpay::Notification.new( response ) end |