Вопрос

I am testing recurring payments. After doExpressCheckoutPayment action i recieved status Pending in my sandbox paypal account. Why status not completed? How much time need to set status Complete? Or maybe need set some params in sandbox. I am used default settings. Payment review - disabled. Thanks!) enter image description here

UPD 1: Here is my request code:

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 response:

    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
)

In my previous question you advised me to install PAYMENTREQUEST_0_PAYMENTACTION to Sale, Maybe this help me to decide this problem?

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top