在我的信用卡处理文件中,我有:
response = PaymentGateway.pay_pal.authorize(
foreign_currency_amount_in_cents,
credit_card,
:email => email_address,
:order_id => invoice_number,
:description => item_id,
:ip => ip_address,
:currency => foreign_currency.name,
:custom_code => credit_card.type
)
中payment_gateway.rb
,我有
class PaymentGateway
class << self
def pay_pal
@pay_pal ||= ActiveMerchant::Billing::PaypalGateway.new(:login => AppConfig.pay_pal[:login], :password => AppConfig.pay_pal[:password])
end
end
在我的environments/production.rb
中,我为 pay_pal 配置分配了更多变量,特别是:
signature: "somesignature"
login: "my.name_api1.mysite.com"
password: "SOMEPASSWORD"
business: "my.name@mysite.com"
business_id: "BUSINESSID"
cert_id: "SOMECERTID"
private_key: |
-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAA...
-----END RSA PRIVATE KEY-----
public_key: |
-----BEGIN CERTIFICATE-----
MIIDGD...
-----END CERTIFICATE-----
我正在尝试切换 PayPal 帐户并创建了一个新的 PayPal 帐户。我真的需要在我的环境文件中切换凭据吗?如果是这样,我使用哪些凭据?登录不是电子邮件地址,我用来登录 PayPal 的是电子邮件地址。