Setting the page_style on ActiveMerchant::Billing::PaypalExpressGateway

66 views
Skip to first unread message

coneybeare

unread,
Apr 28, 2012, 7:14:42 PM4/28/12
to Active Merchant
I am trying to specify a Paypal page style to the express gateway but
it is not acting as expected.

In activemerchant.rb
------------
paypal_setup = YAML.load_file(Rails.root.join('config', 'paypal',
'paypal.yml'))[Rails.env]
ActiveMerchant::Billing::PaypalExpressGateway.pem_file =
File.read(Rails.root.join('config', 'paypal', "#{Rails.env}.key"))
EXPRESS_GATEWAY =
ActiveMerchant::Billing::PaypalExpressGateway.new(paypal_setup)


In paypal.yml
------------
development:
:login: [REDACTED]
:password: [REDACTED]
:page_style: 'TestStyle'

production:
:login: [REDACTED]
:password: [REDACTED]
:page_style: 'TestStyle'



I am able to checkout using the login and password so I know that i
have everything hooked up correctly, it just seems that ActiveMerchant
is not using the page_style param. Am I doing it wrong?

coneybeare

unread,
Apr 29, 2012, 8:18:01 AM4/29/12
to activem...@googlegroups.com
[SOLVED] the :page_style option needs to be passed to the gateway's setup_purchase method, not the initializer.
Reply all
Reply to author
Forward
0 new messages