Skip to content

Instantly share code, notes, and snippets.

@hjelmeir
Created May 8, 2012 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hjelmeir/2631732 to your computer and use it in GitHub Desktop.
Save hjelmeir/2631732 to your computer and use it in GitHub Desktop.
activemerchant- how set up my code, what I want for paypal recurring payments
This is how I set up my gateway in environment file (config/environment/development):
config.payment_gateway = ActiveMerchant::Billing::PaypalGateway.new(
:login => 'rander_1307553309_biz_api1.glideint.com',
:password => '1307553332',
:signature => 'AiCozzWYgDEkMhTodrzOjnIvAbX.AQp38EXocUyf0PKAjIPmXhTGJHKv')
I call the method to capture funds (after credit card is valid)
response = Rails.config.application.payment_gateway.capture(); // this is working in my app
I want to do:
response = Rails.config.application.payment_gateway.recurring() (a method that lives in the included file paypal_recurring_api.rb)
but I get unknown method recurring. I have tried calling the paypal api directly, but then it is uninstantiated constant PaypalRecurringApi
This is the gateway I am using: http://rubydoc.info/github/Shopify/active_merchant/master/ActiveMerchant/Billing/PaypalGateway
which includes:
http://rubydoc.info/github/Shopify/active_merchant/master/ActiveMerchant/Billing/PaypalRecurringApi
I want to access the method recurring inside this PaypalRecurringApi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment