2013-05-25 2 views
0

PayPal의 IPN 장바구니 결제 메시지에서 전달 된 모든 변수 중에서 각 항목에 수량이없는 이유는 무엇입니까? 현재 변수를 가지고 있습니다. num_cart_items, 이는 체크 아웃 한 항목의 수를 나타내는 데 도움이되지만 각 항목의 수량을 설명하는 변수는 없습니다.PayPal IPN 장바구니 수량이 없습니다?

도움이되면 크게 도움이됩니다.

감사합니다 :)

+0

IPN으로 돌아 가기 위해서는 항목 별 세부 정보를 지불해야합니다. Payments Standard, Express Checkout 또는 무엇으로 작업하고 있습니까? –

+0

안녕하세요 앤드류! 나는 PayPal 익스프레스 체크 아웃으로 일하고있다. (직접 POST 페이먼트를 장바구니의 PayPal로 보낸다.) – user2420963

+0

DoExpressCheckoutPayment 콜에있는 모든 세부 정보를 IPN에 나타나도록해야한다. API 요청 샘플을 게시 할 수 있습니까? –

답변

0

난 당신의 코드를 테스트하고 추가 항목을 추가 할 수있는 약간의 조정을했다. 또한 라이브 서버 대신 샌드 박스에 있습니다.

다음 코드는 기본적으로 사용자 코드입니다.

<form name="paypalSubmit" method="POST" action="https://www.sandbox.paypal.com/cgi-bin/webscr"> 
    <input type="hidden" name="cmd" value="_cart"> 
    <input type="hidden" name="business" value="[email protected]"> 
    <input type="hidden" name="image_url" value=""> 
    <input type="hidden" name="item_name_1" value="Xbox Live 12 Month Gold"> 
    <input type="hidden" name="quantity_1" value="1"> 
    <input type="hidden" name="amount_1" value="1.00"> 
    <input type="hidden" name="item_name_2" value="Test Widget 2"> 
    <input type="hidden" name="quantity_2" value="5"> 
    <input type="hidden" name="amount_2" value="5.00"> 
    <input type="hidden" name="upload" value="1"> 
    <input type="hidden" name="currency_code" value="USD"> 
    <input type="hidden" name="rm" value="2"> 
    <input type="hidden" name="cancel_return" value="../"> 
    <input type="hidden" name="no_shipping" value="1"> 
    <input type="hidden" name="no_note" value="0"> 
    <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" alt="Pay now with PayPal!"> 
</form> 

그 결과 다음 IPN이 발생했습니다.

Array 
(
    [mc_gross] => 28.54 
    [protection_eligibility] => Ineligible 
    [item_number1] => 
    [tax] => 2.54 
    [item_number2] => 
    [payer_id] => E7BTGVXBFSUAU 
    [payment_date] => 02:14:13 May 29, 2013 PDT 
    [payment_status] => Completed 
    [charset] => windows-1252 
    [mc_shipping] => 0.00 
    [mc_handling] => 0.00 
    [first_name] => Drew 
    [mc_fee] => 1.13 
    [notify_version] => 3.7 
    [custom] => 
    [payer_status] => verified 
    [business] => [email protected] 
    [num_cart_items] => 2 
    [mc_handling1] => 0.00 
    [mc_handling2] => 0.00 
    [verify_sign] => AWRBYJcBybrYpBI1KkvirwZh2gF5A8KmDftB0jwwIJb8qnifB-Ur32ZE 
    [payer_email] => [email protected] 
    [mc_shipping1] => 0.00 
    [mc_shipping2] => 0.00 
    [tax1] => 0.00 
    [tax2] => 0.00 
    [contact_phone] => 747-668-4003 
    [txn_id] => 03N63014BS023794T 
    [payment_type] => instant 
    [payer_business_name] => Drew Angell's Test Store 
    [last_name] => Angell 
    [item_name1] => Xbox Live 12 Month Gold 
    [receiver_email] => [email protected] 
    [item_name2] => Test Widget 2 
    [payment_fee] => 1.13 
    [quantity1] => 1 
    [quantity2] => 5 
    [receiver_id] => ATSCG2QMC9KAU 
    [txn_type] => cart 
    [mc_gross_1] => 1.00 
    [mc_currency] => USD 
    [mc_gross_2] => 25.00 
    [residence_country] => US 
    [test_ipn] => 1 
    [transaction_subject] => Shopping CartXbox Live 12 Month GoldTest Widget 2 
    [payment_gross] => 28.54 
    [ipn_track_id] => e46d696f3e2a 
) 

IPN 데이터에는 예상대로 개별 항목 이름 및 수량에 대한 변수가 포함되어 있습니다. 이 같은 문제가 발생하지 않으면 원시 IPN 데이터의 샘플을 게시 할 수 있습니까?

+0

안녕하세요, Andrew, PayPal의 샌드 박스 서버에서 얻은 응답은 다음과 같습니다. http://pastebin.com/NJjNMsdu. PayPal은 양식이 거의 다를 때만 제한된 양의 변수를 보내고 있다는 사실이 정말 이상합니다. 지금까지 계속 도와 주신 데 대해 감사드립니다. – user2420963