0

次のフォームを使用して PayPal DoCapture API 呼び出しを送信しました。API 呼び出しを行う正しい方法です。PayPal スタンダード アカウントを使用しています

<form id="paymentForm" action="https://svcs.sandbox.paypal.com/AdaptiveAccounts/DoCapture" method="post" name="paypal">         
    <input id="METHOD" name="METHOD" type="hidden" value="DoCapture" />
    <input id="AUTHORIZATIONID" name="AUTHORIZATIONID" type="hidden" value="7M4218491W8104419" />
    <input id="AMT" name="AMT" type="hidden" value="10" />
    <input id="CURRENCYCODE"  name="CURRENCYCODE" type="hidden" value="EUR" />
    <input id="COMPLETETYPE" name="COMPLETETYPE" type="hidden" value="NotComplete" />
    <input id="STOREID" name="STOREID" type="hidden" value="938738701158035" />         
    <input type="submit" value="Proceed with Payment" id="submit2" name="SUBMIT2"/>
</form>

内部エラーを表示しますか? 同時に私は STOREID パラメータについても知りません..これは何ですか?

例を使用して DoCapture API 呼び出しを実装するのを手伝ってください。

4

2 に答える 2

0

CodeIgniter の PayPal サンドボックス コードで PayPal DoCapture API 呼び出しを作成しました。

public function get_execute_docapture($product_id = '', $paypal = '') {

    $serverName = $_SERVER['SERVER_NAME'];
    $serverPort = $_SERVER['SERVER_PORT'];
    $url = dirname('http://' . $serverName . ':' . $serverPort . $_SERVER['REQUEST_URI']);
    $currencyCodeType = "USD";
    $paymentType = 'Authorization';
    $personName = "Balasaheb Bhise" . " " . "Balasaheb Bhise";
    $SHIPTOSTREET = $_REQUEST['SHIPTOSTREET'];
    $SHIPTOCITY = $_REQUEST['SHIPTOCITY'];
    $SHIPTOSTATE = $_REQUEST['SHIPTOSTATE'];
    $SHIPTOCOUNTRYCODE = $_REQUEST['SHIPTOCOUNTRYCODE'];
    $SHIPTOZIP = $_REQUEST['SHIPTOZIP'];
    $card_name = "";
    $L_NAME0 = 'demo';
    $L_AMT0 = 10;
    $L_QTY0 = 1;
    $L_NAME1 = '';
    $L_AMT1 = 0;
    $L_QTY1 = 0;
    $returnURL = (base_url() . 'product/get_execute_docapture/' . $product_id . 'paypal/');
    $cancelURL = (base_url() . 'product/get_execute_docapture/' . $product_id);
    $itemamt = 0.00;
    $itemamt = $L_QTY0 * $L_AMT0;
    $amt = $itemamt;
    $maxamt = $itemamt;
    $nvpstr = "";

    //  Send transaction id hear
    $AuthorizationId = $transaction_id;
    /*
     * Setting up the Shipping address details
     */
    $shiptoAddress = "&SHIPTONAME=$personName&SHIPTOSTREET=$SHIPTOSTREET&SHIPTOCITY=$SHIPTOCITY&SHIPTOSTATE=$SHIPTOSTATE&SHIPTOCOUNTRYCODE=$SHIPTOCOUNTRYCODE&SHIPTOZIP=$SHIPTOZIP";

    $nvpstr = "&ADDRESSOVERRIDE=1$shiptoAddress&L_NAME0=" . $L_NAME0 . "&L_NAME1=" . $L_NAME1 . "&L_AMT0=" . $L_AMT0 . "&L_QTY0=" . $L_QTY0 . "&MAXAMT=" . (string) $maxamt . "&AMT=" . (string) $amt . "&ITEMAMT=" . (string) $itemamt . "&CALLBACKTIMEOUT=4&L_SHIPPINGOPTIONAMOUNT1=0.00&L_SHIPPINGOPTIONlABEL1=&L_SHIPPINGOPTIONNAME1=UPS Air&L_SHIPPINGOPTIONISDEFAULT1=true&L_SHIPPINGOPTIONAMOUNT0=0.00&L_SHIPPINGOPTIONLABEL0=UPS Ground 7 Days&L_SHIPPINGOPTIONNAME0=Ground&L_SHIPPINGOPTIONISDEFAULT0=false&INSURANCEAMT=0.00&INSURANCEOPTIONOFFERED=true&CALLBACK=https://www.ppcallback.com/callback.pl&SHIPPINGAMT=0.00&SHIPDISCAMT=0.00&TAXAMT=0.00&L_NUMBER0=1000&L_DESC0=" . $card_name . "&L_NUMBER1=&L_DESC1=&L_ITEMWEIGHTVALUE1=&L_ITEMWEIGHTUNIT1=&ReturnUrl=" . $returnURL . "&CANCELURL=" . $cancelURL . "&CURRENCYCODE=" . $currencyCodeType . "&PAYMENTACTION=" . $paymentType . "&AUTHORIZATIONID=" . $AuthorizationId . "&COMPLETETYPE=" . "Complete";
    $nvpstr = $nvpHeader . $nvpstr;

    $resArray = hash_call("DoCapture", $nvpstr);

    echo "<pre>";
    print_r($resArray);
    echo "</pre>";
}
于 2013-12-16T06:19:48.050 に答える