Paypal经常性支付金额为2(在西class牙)

几天前,我写了这篇关于Paypal经常性支付的post,其中包含可变金额的可变金额Paypal经常性支付

我把它标记为固定,但事实并非如此。

首先,我决定开发方法1(通过删除旧的配置文件并创建一个新的配置文件)。 这很有效。 但是,在那之后我意识到,我没有满足我的所有要求。 最后,对我来说正确的方法是2号。这意味着,正如@Andrew Angell建议的那样,我将开发一个向客户收费的自定义计费系统。 为此,我将创建计费协议,我将使用返回的ID以我需要的金额和我需要的时间执行参考交易。 到目前为止,这是对的?

根据Paypal文档,这是可能的: https : //developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/

所以,我试图按照步骤,所以首先执行一个setExpressCheckout:

# Paypal setExpressCheckout def setExpressCheckout(billingType, returnURL, cancelURL, price, description) @api = PayPal::SDK::Merchant::API.new if billingType == "credit-card" billingType = "Billing" else billingType = "Login" end @set_express_checkout = @api.build_set_express_checkout({ SetExpressCheckoutRequestDetails: { ReturnURL: returnURL, CancelURL: cancelURL, LocaleCode: "US", LandingPage: billingType, PaymentDetails: [{ NotifyURL: returnURL, OrderTotal: { currencyID: "EUR", value: price }, ShippingTotal: { currencyID: "EUR", value: "0" }, TaxTotal: { currencyID: "EUR", value: "0" }, PaymentDetailsItem: [{ Name: description, Quantity: 1, Amount: { currencyID: "EUR", value: price }, }], PaymentAction: "Authorization" # To authorize and retain the funds, and when booking is confirmed capture them. }], BillingAgreementDetails: [{ BillingType: "MerchantInitiatedBillingSingleAgreement", BillingAgreementDescription: description }] } }) # Make API call & get response @express_checkout_response = @api.set_express_checkout(@set_express_checkout) # Access Response if @express_checkout_response.success? @token = @express_checkout_response.Token puts "setExpressCheckout completed OK :)" @paypal_url = @api.express_checkout_url(@express_checkout_response) else puts "setExpressCheckout KO :(" @express_checkout_response.Errors puts "@express_checkout_response=" + @express_checkout_response.inspect end @express_checkout_response end 

但是,我收到此错误:

 @LongMessage="Merchant not enabled for reference transactions", @ErrorCode="11452" 

很明显,只需要联系Paypal支持人员并要求他们在我的Paypal沙盒帐户中启用参考交易。 对? 我已经做到了,我只是在等待。

然而,真正让我担心的是,我打电话给Paypal支持,他们告诉我这种方法在西class牙不起作用。 虽然它在文档中,但它只在英国工作。 这是真的?

如果这是真的,我真的遇到了麻烦,因为据我所知,Paypal并不支持可变金额的订阅。

Paypal技术支持人员已启用我的沙箱帐户引用交易。 我已经开发了逻辑并且它正在工作。 至少,在沙盒和西class牙。

所以,我会假设它有效。

手机上的Paypal人不好,告诉我这是不可能的。