【问题标题】:Integration of activemerchant offsite payment Directebanking in Spree在 Spree 中集成 activemerchant 异地支付 Directebanking
【发布时间】:2014-07-28 16:02:21
【问题描述】:

我即将把那个activemerchant的异地支付方式整合到大礼包中:https://github.com/Shopify/offsite_payments/blob/master/lib/offsite_payments/integrations/directebanking.rb

我在app/models/gateway 中创建了一个Spree::Gateway 类,以便我可以在管理面板中配置该方法:

class Spree::Gateway::Directebanking < Spree::Gateway
    preference :credential1, :string
    preference :credential2, :string
    preference :credential3, :string
    preference :credential4, :string

    def provider_class
        ActiveMerchant::Billing::Integrations::Directebanking
    end
end

我还在 config/application.rb 中添加了这些行:

config.after_initialize do  
    Rails.configuration.spree.payment_methods << Spree::Gateway::SofortUeberweisung
end

但是,现在我被三件事困住了:

  1. 我不确定我是否在 Spree::Gateway 类中添加了正确的首选项。如何找出需要为 directebanking 模块添加的首选项?

  2. 什么是付款工作流程?如果我尝试使用付款方式结帐,则会收到 ActiveMerchant::Billing::Integrations::Directebanking:Module 的“未定义方法新”错误。

  3. 如何禁用显示信用卡字段(例如姓名、信用卡号、cvc 等)的默认 Javascript 行为?我希望应用程序通过单击“结帐”重定向到 Directebanking.service_url。

【问题讨论】:

  • 您找到解决方案了吗?我对不同的支付网关有同样的问题

标签: spree activemerchant


【解决方案1】:

没有真正回答你的问题,但你去吧。

offsite_payment gem 最近才从 ActiveMerchant 中提取。您最好暂时只使用 ActiveMerchant。

如果你想使用offsite_payment,我认为你应该使用新改名的类:

def provider_class
    OffsitePayments::Integrations::Directebanking
end

【讨论】:

    猜你喜欢
    • 2012-10-24
    • 2018-02-19
    • 2013-12-09
    • 2013-11-01
    • 2023-03-03
    • 1970-01-01
    • 2011-06-16
    • 2012-07-23
    • 2020-06-08
    相关资源
    最近更新 更多