Class: ActiveMerchant::Billing::MoneybookersGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::MoneybookersGateway
- Defined in:
- lib/active_merchant/billing/gateways/moneybookers.rb
Constant Summary collapse
- PAYMENT_URL =
'https://www.moneybookers.com/app/payment.pl'
- API_VERSION =
Moneybookers API version September 03, 2009
"6.8"
Instance Method Summary collapse
- #checkout_url ⇒ Object
-
#initialize(options = {}) ⇒ MoneybookersGateway
constructor
A new instance of MoneybookersGateway.
- #setup_purchase(amount) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ MoneybookersGateway
Returns a new instance of MoneybookersGateway.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/active_merchant/billing/gateways/moneybookers.rb', line 40 def initialize( = {}) requires!(, :pay_to_email, # merchant email :return_url, # after client purchases :cancel_url, # after client cancels :language, # displayed mb page language # notification from mb after successful payment # may also be an email, but you may use # :notify_email additionally for that :notify_url, # details show up in clients payments history :detail1_description, # e.g. "Product ID:" :detail1_text ) @options = super end |
Instance Method Details
#checkout_url ⇒ Object
63 64 65 |
# File 'lib/active_merchant/billing/gateways/moneybookers.rb', line 63 def checkout_url @response.success? && redirect_url || nil end |
#setup_purchase(amount) ⇒ Object
58 59 60 61 |
# File 'lib/active_merchant/billing/gateways/moneybookers.rb', line 58 def setup_purchase(amount) data = post_data(amount,{:prepare_only => "1"}) @response = MoneybookersResponse.new(ssl_post(PAYMENT_URL, data)) end |