2016-08-02 11 views
0

チェックアウト処理中に部分支払いを可能にするモジュールを作成しようとしています。Magento - Paypal Expressを使用して部分支払いを作成する際にエラーが発生する

2つの商品、最初の商品= 1000€、2番目の商品= 500€でカートをどうぞ。

ユーザーは1500ユーロを支払う必要がありますが、2段階で支払いを分割することができます。最初のユーザーは1000ユーロを支払い、後で500ユーロを支払う必要があります。

PayPal gateway has rejected request. 
Item total is invalid (#10426: Invalid Data). 
The totals of the cart item amounts do not match order amounts 
(#10413: Transaction refused because of an invalid argument. 
See additional error messages for details). 

は基本的に、私がやっていることはAmountの値を上書きapp/code/local/Mage/Paypal/Model/Expressを変更されています:

$transaction_amount = $this->_quote->getBaseGrandTotal(); 
if ($this->_quote->getPartialpayment_price() > 0) { 
    $transaction_amount = $this->_quote->getPartialpayment_price(); 
} 

$this->_api->setAmount($transaction_amount) 
     ->setCurrencyCode($this->_quote->getBaseCurrencyCode()) 
     ->setInvNum($this->_quote->getReservedOrderId()) 
     ->setReturnUrl($returnUrl) 
     ->setCancelUrl($cancelUrl) 
     ->setSolutionType($solutionType) 
     ->setPaymentAction($this->_config->paymentAction); 
このためのPaypal Expressの支払いを使用しようと、私はいつもこのエラーを取得してい

最終的な金額をカートアイテムの金額と比較するために、Paypalが内部的にチェックしていることを避けることはどういうことですか?

答えて

0

個々のアイテムをPaypal APIリクエストに送信しないようにするには、バックエンドにTransfer Cart Line Itemsというオプションがあります。 NOに設定されている場合、各カートアイテムはそのリクエストに追加されません。

Paypal Request

関連する問題