2010-06-22 4 views
4

다음은 Paypal 웹 사이트 결제 표준 업로드 사항을 테스트하는 데 사용하는 간단한 코드입니다.Paypal 반환 URL - GET 매개 변수 사용?

반환 URL은 http://mysite/index.php?module=store&show=order_confirm 입니다. 결제 과정을 거치고 끝나면 페이지로 돌아 오지만 대신 index.php (즉, 추가 매개 변수 없음)로 돌아갑니다.

사람이 함께 거래

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> 

    <input type="hidden" name="cmd" value="_cart" /> 

    <input type="hidden" name="upload" value="1"> 
    <input type="hidden" name="return" value="http://mysite/index.php?module=store&amp;show=order_confirm" /> 
    <input type="hidden" name="currency_code" value="EUR" /> 

    <input type="hidden" name="business" value="[email protected]"> 

      <input type="hidden" name="item_name_1" value="adaddada" /> 
      <input type="hidden" name="amount_1" value="30.00" /> 

      <input type="hidden" name="quantity_1" value="1" /> 
          <input type="hidden" name="item_name_2" value="wuiui" /> 
      <input type="hidden" name="amount_2" value="50.00" /> 
      <input type="hidden" name="quantity_2" value="1" /> 


    <input type="hidden" name="custom" value="19" /> 

    <input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" alt="PayPal - The safer, easier way to pay online"> 

</form> 

답변

3

필자는 왜 Paypal이 자신이하고있는 일을하고 있는지 잘 모르겠지만, 자신의 GET 매개 변수를 추가하려는 욕구가 자신의 정보를 훔쳐 가고 있다고 의심합니다. 당신은 mod_rewrite를 또는 비슷한을 사용할 수 있는지, 이런 식으로 뭔가를 시도 할 수 있습니다 :

http://mysite/store/order_confirm/?merchant_return_link=Test+Store 

또 다른 대답은이

http://mysite/index.php?merchant_return_link=Test+Store&module=store&show=order_confirm 
+0

고마워요. 결국 내 솔루션은 paypalreturn.php라는 간단한 PHP 파일로 돌아가는 것이 었습니다. , 내가 가고 싶었던 페이지로 리다이렉트했다. – bcoughlan

3

가 탈출 시도 무엇인지? 반환 URL에 &; % 3F 및 % 26으로 변경하십시오.

+0

좋은 아이디어입니다. 그것은 index.php로 돌아가서 "? merchant_return_link = Test + Store"를 끝에 추가하여 작동하지 않습니다. – bcoughlan

3

에 :

이 변경하는 규칙을 작성할 paypal 'rm'[return method] 변수를 "2"로 설정하여 paypal이 GET 변수로 보내지 않고 모든 자체 리턴 변수를 POST하도록합니다.