2016-06-22 3 views
0

지불 요약 숨기기는이 코드를 시도했지만이 나를 위해 일하고, 나는이 명시 체크 아웃 및 적응 지불 둘 필요가있다,주문 요약 쇼와 페이팔 적응 지불

나는 다른 방법을 시도했지만 추가 주문했다 페이팔 적응 지불에 대한 요약 및 지불 요약이 작동하지 않습니다

function Pay() 
{ 
    $PayRequestFields = array(
          'ActionType' => 'PAY',        // Required. Whether the request pays the receiver or whether the request is set up to create a payment request, but not fulfill the payment until the ExecutePayment is called. Values are: PAY, CREATE, PAY_PRIMARY 
          'CancelURL' => site_url('paypal/adaptive_payments/pay_cancel'),          // Required. The URL to which the sender's browser is redirected if the sender cancels the approval for the payment after logging in to paypal.com. 1024 char max. 
          'CurrencyCode' => 'AUD',        // Required. 3 character currency code. 
          'FeesPayer' => 'EACHRECEIVER',         // The payer of the fees. Values are: SENDER, PRIMARYRECEIVER, EACHRECEIVER, SECONDARYONLY 
          'IPNNotificationURL' => '',       // The URL to which you want all IPN messages for this payment to be sent. 1024 char max. 
          'Memo' => '',          // A note associated with the payment (text, not HTML). 1000 char max 
          'Pin' => '',          // The sener's personal id number, which was specified when the sender signed up for the preapproval 
          'PreapprovalKey' => '',        // The key associated with a preapproval for this payment. The preapproval is required if this is a preapproved payment. 
          'ReturnURL' => site_url('paypal/adaptive_payments/pay_return'),          // Required. The URL to which the sener's browser is redirected after approvaing a payment on paypal.com. 1024 char max. 
          'ReverseAllParallelPaymentsOnError' => '',   // Whether to reverse paralel payments if an error occurs with a payment. Values are: TRUE, FALSE 
          'SenderEmail' => '',        // Sender's email address. 127 char max. 
          'TrackingID' => ''         // Unique ID that you specify to track the payment. 127 char max. 
          ); 

    $ClientDetailsFields = array(
          'CustomerID' => '',         // Your ID for the sender 127 char max. 
          'CustomerType' => '',        // Your ID of the type of customer. 127 char max. 
          'GeoLocation' => '',        // Sender's geographic location 
          'Model' => '',          // A sub-identification of the application. 127 char max. 
          'PartnerName' => ''         // Your organization's name or ID 
          ); 

    $FundingTypes = array('ECHECK', 'BALANCE', 'CREDITCARD'); 

    $Receivers = array(); 
    $Receiver = array(
        'Amount' => '25' 
        'Email' => '[email protected]', 
        // Receiver's email address. 127 char max. 
        'InvoiceID' => '',           // The invoice number for the payment. 127 char max. 
        'PaymentType' => '',          // Transaction type. Values are: GOODS, SERVICE, PERSONAL, CASHADVANCE, DIGITALGOODS 
        'PaymentSubType' => '',          // The transaction subtype for the payment. 
        'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => ''), // Receiver's phone number. Numbers only. 
        'Primary' => ''            // Whether this receiver is the primary receiver. Values are: TRUE, FALSE 
        ); 
    array_push($Receivers,$Receiver); 

    $Receiver = array(
        'Amount' => '10',  
        'Description' => 'asdfghj', 
        // Required. Amount to be paid to the receiver. 
        'Email' => '[email protected]', 
        // Receiver's email address. 127 char max. 
        'InvoiceID' => '',           // The invoice number for the payment. 127 char max. 
        'PaymentType' => '',          // Transaction type. Values are: GOODS, SERVICE, PERSONAL, CASHADVANCE, DIGITALGOODS 
        'PaymentSubType' => '',          // The transaction subtype for the payment. 
        'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => ''), // Receiver's phone number. Numbers only. 
        'Primary' => ''            // Whether this receiver is the primary receiver. Values are: TRUE, FALSE 
        ); 
    array_push($Receivers,$Receiver); 
    //print_r($Receivers);die; 



    $SenderIdentifierFields = array(
            'UseCredentials' => ''      // If TRUE, use credentials to identify the sender. Default is false. 
            ); 

    $AccountIdentifierFields = array(
            'Email' => '',        // Sender's email address. 127 char max. 
            'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => '')        // Sender's phone number. Numbers only. 
            ); 

    $PayPalRequestData = array(
         'PayRequestFields' => $PayRequestFields, 
         'ClientDetailsFields' => $ClientDetailsFields, 
         'FundingTypes' => $FundingTypes, 
         'Receivers' => $Receivers, 
         'SenderIdentifierFields' => $SenderIdentifierFields, 
         'AccountIdentifierFields' => $AccountIdentifierFields 
         ); 

    $PayPalResult = $this->paypal_adaptive->Pay($PayPalRequestData); 

    if(!$this->paypal_adaptive->APICallSuccessful($PayPalResult['Ack'])) 
    { 
     $errors = array('Errors'=>$PayPalResult['Errors']); 
     $this->load->view('front/error',$errors); 
    } 
    else 
    { 
     // Successful call. Load view or whatever you need to do here. 
     echo '<pre />'; 
     print_r($PayPalResult); 
     echo '<p><a href="' . $PayPalResult['RedirectURL'] . '">PROCEED TO PAYPAL</a></p>'; 
    } 
} 
+0

작동하지? 에러 메시지? 네가 예상했던대로 하지마? 좀 더 구체적으로하십시오 – Dave

답변

0

익스프레스 체크 아웃은 적응 지불 라이브러리를 사용하지 않습니다.

익스프레스 체크 아웃 API를 사용하여 API 호출과 다른 페이팔 판매자 계정 아이디 (이메일)를 제공 할 수 있습니다. 이 구성을 사용하면 빠른 체크 아웃 (리디렉션 모드에서도)의 병렬 지불이 가능하며 주문 총액 중 어느 부분으로 사용자를 제어 할 수 있습니다.

빠른 체크 아웃으로 장바구니 세부 정보를 제어하는 ​​것은 매우 쉽습니다.

문서에 대한 링크 : 어떻게 https://developer.paypal.com/docs/classic/express-checkout/ht_ec-parallelPayments/

+0

여러 페이팔 계정의 지불 (적응 형)을 분할하고 사용자 페이팔 체크 아웃에서 주문 내역을 표시해야합니다. –

+1

예, 귀하가 병렬 지불을 사용하여 구현해야하는 것이므로 금액을 먼저 나눈 다음 병렬로 사용할 수 있습니다 전환하고 원하는 것을 얻을 것입니다 –

관련 문제