Я проверяю регулярные платежи.После действия doExpressCheckoutPayment я получил статус Pending в моей учетной записи PayPal.Почему статус не завершен?Сколько нужно времени, чтобы установить статус Complete?Или, может быть, нужно установить несколько параметров в песочнице.Я использовал настройки по умолчанию.Проверка платежа - отключена.Спасибо!)
UPD 1: Вот мой код запроса:
public function setPayment($plan){
$params = array(
'PAYMENTREQUEST_0_AMT' => '10.00',
'RETURNURL' => $this->base_url.'/paypal/response',
'CANCELURL' => $this->base_url.'/paypal/paypal',
'PAYMENTREQUEST_0_PAYMENTACTION' => 'Authorization',
'PAYMENTREQUEST_0_CURRENCYCODE' => 'GBP',
'PAYMENTREQUEST_0_DESC' => 'Testing PayPal recurring',
'PAYMENTREQUEST_0_NOTIFYURL' => 'http://barton.netai.net/ipn.php',
'L_BILLINGTYPE0' => 'RecurringPayments',
'L_BILLINGAGREEMENTDESCRIPTION0' => 'SamePayments'
);
$this->_paypal->addFields($params);
$response = $this->_paypal->request('SetExpressCheckout');
if (strtoupper($response['ACK'])=='SUCCESS'){
$token=$response['TOKEN'];
header('Location: '.$this->_paypal->getPaypalUrl().'?cmd=_express-checkout&token='.$token);
return true;
} else {
return false;
}
}
public function responseAction(){
if (isset($_GET['token']) && isset($_GET['PayerID'])){
$this->_paypal->addFields(array('TOKEN'=>$_GET['token']));
$response=$this->_paypal->request('GetExpressCheckoutDetails');
if ($response['ACK']=='Success'){
$response=array();
$this->_paypal->addFields(array(
'TOKEN' => $_GET['token'],
'PAYMENTREQUEST_0_PAYMENTACTION' => 'Authorization',
'PAYERID' => $_GET['PayerID'],
'L_BILLINGTYPE0' => 'RecurringPayments',
'L_BILLINGAGREEMENTDESCRIPTION0' => 'SamePayments',
'PAYMENTREQUEST_0_AMT' => '10.00',
'PAYMENTREQUEST_0_CURRENCYCODE' => 'GBP'
));
$response=$this->_paypal->request('DoExpressCheckoutPayment');
show($response); exit;
}
}
}
Ответ SetExpressCheckout:
Array
(
[TOKEN] => EC-01C99915Y11155245
[TIMESTAMP] => 2012-02-24T10:23:32Z
[CORRELATIONID] => 69e91a5abc347
[ACK] => Success
[VERSION] => 84
[BUILD] => 2571254
)
doExpressCheckoutPayment response:
Array
(
[TOKEN] => EC-2FR88291S31672645
[SUCCESSPAGEREDIRECTREQUESTED] => false
[TIMESTAMP] => 2012-02-24T10:26:08Z
[CORRELATIONID] => a95c7a9bb64b3
[ACK] => Success
[VERSION] => 84
[BUILD] => 2571254
[INSURANCEOPTIONSELECTED] => false
[SHIPPINGOPTIONISDEFAULT] => false
[PAYMENTINFO_0_TRANSACTIONID] => 2RN165632T770592L
[PAYMENTINFO_0_TRANSACTIONTYPE] => expresscheckout
[PAYMENTINFO_0_PAYMENTTYPE] => instant
[PAYMENTINFO_0_ORDERTIME] => 2012-02-24T10:26:06Z
[PAYMENTINFO_0_AMT] => 10.00
[PAYMENTINFO_0_TAXAMT] => 0.00
[PAYMENTINFO_0_CURRENCYCODE] => GBP
[PAYMENTINFO_0_PAYMENTSTATUS] => Pending
[PAYMENTINFO_0_PENDINGREASON] => authorization
[PAYMENTINFO_0_REASONCODE] => None
[PAYMENTINFO_0_PROTECTIONELIGIBILITY] => Eligible
[PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE] => ItemNotReceivedEligible,UnauthorizedPaymentEligible
[PAYMENTINFO_0_SECUREMERCHANTACCOUNTID] => WLC8CZSP2C5L8
[PAYMENTINFO_0_ERRORCODE] => 0
[PAYMENTINFO_0_ACK] => Success
)
В моем предыдущем вопросе вы посоветовали мне установить PAYMENTREQUEST_0_PAYMENTACTION на продажу, может быть, это поможет мне решить эту проблему?