Класс-обработчик Paypal Никто не помогает!

Дополнение: minishop2

Доброе время суток!

Сделал два разный класса-обработчика на систему оплаты paypal один принимает одну валюту, другой другую.

Проблема в том что стандартный класс работает как нужно, а вот второй выдает такую ошибку

[2016-08-11 19:42:45] (ERROR @ /assets/components/minishop2/payment/paypalusd.php) [miniShop2] Could not finalize operation: Request: Array
(
    [METHOD] => DoExpressCheckoutPayment
    [PAYMENTREQUEST_0_PAYMENTACTION] => Sale
    [PAYMENTREQUEST_0_AMT] => 85.00
    [PAYMENTREQUEST_0_CURRENCYCODE] => EUR
    [PAYERID] => U9YVWDG6G958E
    [TOKEN] => EC-6LV13182KL133001H
)
, response: Array
(
    [TOKEN] => EC-6LV13182KL133001H
    [SUCCESSPAGEREDIRECTREQUESTED] => false
    [TIMESTAMP] => 2016-08-11T16:42:45Z
    [CORRELATIONID] => c9d3c7ae18f74
    [ACK] => Failure
    [VERSION] => 74.0
    [BUILD] => 24362847
    [L_ERRORCODE0] => 10444
    [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
    [L_LONGMESSAGE0] => The transaction currency specified must be the same as previously specified.
    [L_SEVERITYCODE0] => Error
)
Отрывок того что менял:
class PayPalUSD extends msPaymentHandler implements msPaymentInterface {

	function __construct(xPDOObject $object, $config = array()) {
		$this->modx = & $object->xpdo;

		$siteUrl = $this->modx->getOption('site_url');
		$assetsUrl = $this->modx->getOption('assets_url').'components/minishop2/';
		$paymentUrl = $siteUrl . substr($assetsUrl, 1) . 'payment/paypalusd.php';

		$this->config = array_merge(array(
			'paymentUrl' => $paymentUrl
			,'apiUrl' => $this->modx->getOption('ms2_payment_paypal_api_url', null, 'https://api-3t.paypal.com/nvp')
			,'checkoutUrl' => $this->modx->getOption('ms2_payment_paypal_checkout_url', null, 'https://www.paypal.com/webscr?cmd=_express-checkout&token=')
			,'currency' => $this->modx->getOption('ms2_payment_paypal_currency2', null, 'USD')
			,'user' => $this->modx->getOption('ms2_payment_paypal_user')
			,'password' => $this->modx->getOption('ms2_payment_paypal_pwd')
			,'signature' => $this->modx->getOption('ms2_payment_paypal_signature')
			,'json_response' => false
		), $config);
	}
11 august 2016, 23:15    Паша Палиенко   
0    292 0

Comments (1)

  1. Паша Палиенко 15 august 2016, 21:05 # 0
    Up
    You need to login to create comments.