का उपयोग करके अपने लेनदेन को पूरा करने के लिए कृपया प्राप्तकर्ता की वेबसाइट पर वापस आएं, मैं पेपैल भुगतान गेटवे लागू करने की कोशिश कर रहा था।पेपैल त्रुटि: यह लेनदेन अमान्य है। अपने नियमित चेकआउट प्रवाह
This transaction is invalid. Please return to the recipient's website to complete your transaction using their regular checkout flow.
रत्न में फ़ाइल
gem 'activemerchant', :require => 'active_merchant'
development.rb में
config.after_initialize do
ActiveMerchant::Billing::Base.mode = :test
paypal_options = {
:login => "************",
:password => "************",
:signature => "************",
}
::STANDARD_GATEWAY = ActiveMerchant::Billing::PaypalGateway.new(paypal_options)
::EXPRESS_GATEWAY = ActiveMerchant::Billing::PaypalExpressGateway.new(paypal_options)
end
नमूना कोड मैं में उपयोग कर रहा हूँ:
लेकिन मैं एक त्रुटि हो रही है मीटर y नियंत्रक
response = EXPRESS_GATEWAY.setup_purchase(10000,
:ip => request.remote_ip,
:return_url => new_order_url,
:cancel_return_url => orders_url
)
p response
p response.token
redirect_to EXPRESS_GATEWAY.redirect_url_for(response.token)
ओ/प्रतिक्रिया के लिए पी:
#<ActiveMerchant::Billing::PaypalExpressResponse:0x007f90bbababa0 @params={"timestamp"=>"2011-12-17T21:41:21Z", "ack"=>"Failure", "correlation_id"=>"c152e1862f475", "version"=>"62.0", "build"=>"2271164", "message"=>"Security header is not valid", "error_codes"=>"10002", "Timestamp"=>"2011-12-17T21:41:21Z", "Ack"=>"Failure", "CorrelationID"=>"c152e1862f475", "Errors"=>{"ShortMessage"=>"Security error", "LongMessage"=>"Security header is not valid", "ErrorCode"=>"10002", "SeverityCode"=>"Error"}, "Version"=>"62.0", "Build"=>"2271164"}, @message="Security header is not valid", @success=false, @test=true, @authorization=nil, @fraud_review=false, @avs_result={"code"=>nil, "message"=>nil, "street_match"=>nil, "postal_match"=>nil}, @cvv_result={"code"=>nil, "message"=>nil}>
ओ/response.token
nil
तो मुझे लगता है समस्या response.token है
नहीं के बराबर है के लिए पीकोई सुझाव क्यों यह हो रहा है?
मुझे मिल गया .. और यह काम किया .. बहुत बहुत शुक्रिया दोस्त .. यू मेरा बड़ा समय गधे को बचा लिया। .. तुमसे बहुत प्यार करता हूँ .. बक्षीस को सम्मानित किया .. वोट अप .. जवाब का जवाब दिया .. अब आप टिप्पणी कर सकते हैं .. वोट करें .. वोट दें .. और बहुत कुछ .. बहुत दोस्त .. thnks बहुत अच्छा .. –
Awsome, खुशी है कि मैं मदद कर सकता हूं और अंक स्वागत है इसलिए मैं और अधिक शामिल हूं। चीयर्स। – slarti42uk