开发者

Step-By-Step To Create A Checkout Form (PHP) Using Paypal Sandbox

开发者 https://www.devze.com 2023-01-18 03:25 出处:网络
Good day, everyone! Currently I\'m working with my school project. I need to create a checkout form using Paypal and the website is written in php/apache/localhost. After a little research I know tha

Good day, everyone!

Currently I'm working with my school project. I need to create a checkout form using Paypal and the website is written in php/apache/localhost. After a little research I know that we can use Paypal Sandbox (not the real paypal) to simulate payment. But I've no clue how to do it. I've read some tutorial, but just make me become more confuse. I know a little about web service (soap) with php-curl. So if anyone has ever create paypal checkout using paypal sandbox, could you share what step-by-step you've done using 开发者_如何学Goeasiest term and language?

This are the best resource I can get (yet can't understand):

  • http://net.tutsplus.com/tutorials/php/using-paypals-instant-payment-notification-with-php/ --> not using paypal sandbox
  • And from the paypal itself, https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_documentation

Thank you so much and God bless.


Note that I'm maybe the laziest dumb (joke)


Try this code.

  <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" style="padding: 0; margin: 0;">
    <input type="hidden" name="cmd" value="_xclick/" />
    <input type="hidden" name="business" value="your bussiness id" />
    <input type="hidden" name="quantity" value="1" />
    <input type="hidden" name="item_name" value="your item" />
    <input type="hidden" name="item_number" value="1" />
    <input type="hidden" name="amount" value="item price" />
    <input type="hidden" name="shipping" value="0" />
    <input type="hidden" name="no_note" value="1" />
    <input type="hidden" name="notify_url" value="Your notify url">
    <input type="hidden" name="currency_code" value="GBP" />
    <input type="hidden" name="rm" value="2" >
    <input type="hidden" name="return" value="your return url">
    <input type="image" border="0" name="paypal" src="images/btn_paypal_nl.gif" onClick="" />
    </form>

Thanks,

Kanji

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号