2014-06-18 3 views
2

나는 내 레일 애플리케이션에 payy.in 지불 게이트웨이를 spree와 통합하려고합니다. 나는 응용 프로그램에 보석 'active_merchant_payu_in'을 포함 시켰습니다.유료 지불 게이트웨이 (active_merchant_payu_in)와 함께 spree

내 애플/모델/마구/게이트웨이/payu.rb은 다음과 같습니다 : 내가 가지고있는 application.rb

config.after_initialize do |app| 
    app.config.spree.payment_methods += [ 
    Spree::Gateway::Payu 
    ] 
end 

Development.rb

config.after_initialize do 
    ActiveMerchant::Billing::Base.mode = :test  
    $payu_merchant_id = ActiveMerchant::Billing::Integrations::PayuIn.merchant_id = '--ID--' 
    $payu_secret_key = ActiveMerchant::Billing::Integrations::PayuIn.secret_key = '--Key--'  
end 

에서

module Spree 
    class Gateway::Payu < Gateway 
    def provider_class 
     ActiveMerchant::Billing::Integrations::PayuIn 
    end 
    end 
end 

관리자 자격 증명에서 Spree :: Gateway :: Payu를 사용할 수 있습니다. 지금 나는 체크 아웃 할 때 나는 아래의 오류를 얻는다. 야단법석에서

NoMethodError :: CheckoutController 번호 업데이트 정의되지 않은 방법은`ActiveMerchant에 대한 '권한을 부여 :: 청구 :: 통합 :: PayuIn : 모듈

사람은 옳은 길을 향해 나를 안내 할 수 있습니다. 많은 감사합니다 :)

답변

0

누구든지이 문제에 직면하고 있습니다.

해결 방법 : 지불 방법 "Spree :: Gateway :: Payu"를 편집하고 auto_capture? 필드를 true으로 설정하십시오.

Payu는 "자동 캡처"가 false 일 때 호출되며 true으로 설정되면 payu에서 지원하는 "구매"메소드가 호출됩니다.

자동 캡처에 대한 자세한 내용은 Spree의 설명서를 참조하십시오. https://guides.spreecommerce.com/developer/payments.html