2012-02-22 4 views
3

나는 이것을 알아 내려고 노력하고 있지만 도움이 필요합니다.PayPal 일부 드롭 메뉴가있는 HTML 양식

고객이 선택하여 구입할 수 있도록 여러 제품을 선택 목록에 제공하고 싶습니다.

<FORM action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
    <INPUT TYPE="hidden" name="cmd" value="_xclick"/> 
    <INPUT TYPE="hidden" name="charset" value="utf-8"/> 
    <INPUT TYPE="hidden" NAME="return" value="http://www.albertamomentummassage.com/gift-certificate-thank-you/"/> 
    <INPUT TYPE="hidden" NAME="rm" value="2"/> 
    <INPUT TYPE="hidden" NAME="currency_code" value="CAD"/> 
    <INPUT TYPE="hidden" NAME="business" value="[email protected]"/> 

    <select name="os_0" value="Therapeutic Massage"> 
     <option value="2 Hour Masssage">2 Hour Massage $160.00 CAD</option> 
     <option value="90 Minute Massage">90 Minute Massage $120.00 CAD</option> 
    </select> 

    <input type="hidden" name="option_amount0" value="160"/> 
    <input type="hidden" name="option_amount1" value="120"/> 

    <input type="submit" src="http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" /> 
</FORM> 

PayPal로 리디렉션되면 항목 설명과 항목 가격이 모두 누락됩니다.

답변

4

여전히 item_name 입력란을 보내야합니다. 드롭 다운 목록은 항목을 카트에 추가하기위한 수정 자의 역할을합니다. 드롭 다운 목록 자체와 더불어 option_select (n) 및 option_amount (n)도 양식에 보내야합니다. 아래의 예제를 확인해보십시오, Paypal 버튼 제너레이터에서 나온 것이므로 롤링해야합니다.

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> 
<input type="hidden" name="cmd" value="_cart"> 
<input type="hidden" name="business" value="[email protected]"> 
<input type="hidden" name="lc" value="US"> 
<input type="hidden" name="item_name" value="Massage service"> 
<input type="hidden" name="button_subtype" value="products"> 
<input type="hidden" name="no_note" value="0"> 
<input type="hidden" name="currency_code" value="CAD"> 
<input type="hidden" name="add" value="1"> 
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHostedGuest"> 
<table> 
    <tr><td><input type="hidden" name="on0" value="Duration">Duration</td></tr> 
    <tr><td> 
    <select name="os0"> 
    <option value="90 minutes">90 minutes $120.00 CAD</option> 
    <option value="2 hours">2 hours $160.00 CAD</option> 
    </select> 
    </td></tr> 
</table> 
<input type="hidden" name="currency_code" value="CAD"> 
<input type="hidden" name="option_select0" value="90 minutes"> 
<input type="hidden" name="option_amount0" value="120.00"> 
<input type="hidden" name="option_select1" value="2 hours"> 
<input type="hidden" name="option_amount1" value="160.00"> 
<input type="hidden" name="option_index" value="0"> 
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> 
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> 
</form> 
+0

감사합니다. 도움이되었습니다. –

관련 문제