2012-10-23 4 views
1

샌드 박스에서 Paypal 가입 버튼을 테스트하고 있으며 기본적으로 구매를 완료하고 반송 URL을 지정할 때 auth라는 암호화 된 변수가 전송됩니다. 코드에 문제가 있거나 Paypal 샌드 박스를 사용할 때 작동해야하는 방식입니까? IPN 시뮬레이터를 테스트하기 위해 로컬 컴퓨터를 사용하고 있기 때문에 분명히 결과를 얻지 못했기 때문에 IPN 부분을 시도하지 않았습니다. 도와주세요! 나는 샌드 박스에서이 양식을 테스트 할 때마다Paypal sandbox return url

   <? 
       //paypal url for standard form submission via post... no API 
       $environment = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; 
       $cancel_url='http://192.168.100.136/ProjectX/protos/jquery-menu2/'; 
       $return_url='http://www.interorg.com'; 
       $notify_url='http://192.168.100.136/ProjectX/protos/jquery-menu2/includes/ipn2.php'; 

       ?> 



     <form name='subscribe' action="<?=$environment?>" method="post"> 
     <input type="hidden" name="cmd" value="_xclick-subscriptions"> 
     <input type="hidden" name="business" value="[email protected]"> 
     <input type="hidden" name="lc" value="US"> 
     <input type="hidden" name="item_name" value="Subscription to InterOrg - Membership Plan: Silver"> 
     <input type="hidden" name="item_number" value="1nT3r0rG"> 
     <input type="hidden" name="src" value="1"> 
     <input type="hidden" name="currency_code" value="USD"> 
     <input type="hidden" name="usr_manage" value="1"> 

     <input type="hidden" name="return" value="<?=$return_url?>"> 
     <input type="hidden" name="cancel_return" value="<?=$cancel_url?>"> 

     <input type="hidden" name="notify_url" value="<?=$notify_url?>"> 

     <input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHostedGuest"> 
     <table> 
     <tr><td><input type="hidden" name="on0" value=""></td></tr><tr><td> 
      <select name="os0"> 
      <option value="Monthly1">Silver : $10.00 USD - monthly</option> 
      <option value="Monthly2">Golden : $20.00 USD - monthly</option> 
     </select> </td><td> 
      <!--<button type="submit" value="Subscribe" style="font-Weight:bolder; padding-left:6px; padding-right:6px; padding:3px" name="submit" alt="PayPal">Subscribe</button>--> 
     <input type="submit" value='Subscribe' style='font-Weight:bolder'> 
      </td></tr> 
     </table> 

     <input type="hidden" name="no_note" value="1"> 
     <input type="hidden" name="no_shipping" value="1"> 
     <input type="hidden" name="currency_code" value="USD"> 
     <input type="hidden" name="option_select0" value="Monthly1"> 
     <input type="hidden" name="option_amount0" value="10.00"> 
     <input type="hidden" name="option_period0" value="M1"> 
     <input type="hidden" name="option_frequency0" value="1"> 
     <input type="hidden" name="option_select1" value="Monthly2"> 
     <input type="hidden" name="option_amount1" value="20.00"> 
     <input type="hidden" name="option_period1" value="M2"> 
     <input type="hidden" name="option_frequency1" value="1"> 
     <input type="hidden" name="option_index" value="0"> 
     <input type="hidden" name="src" value="1"> 
     <input type="hidden" name="amount" value="10.00"> 



     <!-- original code from the paypal standard button generator 
     <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> 
     --> 
     <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> 
     </form> 

, 나는 변수는 다음과 같이 얻을 :

?auth=ACApkCA2r7JK2eRIY-KBHrr6UylVMQouy4DDWvWwpthFjWfxxlT.oe2zSaP5RPRGiMi-ZEutGj.9NH.KvsWoXfA&form_charset=UTF-8 

답변

3

은 "RM"매개 변수를 추가하고 설정을 "2". 이렇게하면 모든 트랜잭션 변수와 함께 성공 페이지로 POST됩니다. Read more here.

+0

감사합니다. –