Payment Standard & notify_url

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cylivepay

    #1

    Payment Standard & notify_url

    Our client is using the below code for completing an online payment with paypal.

    Code:
    <form action='https://www.paypal.com/cgi-bin/webscr' target='_blank' method='post'>
    <input type='hidden' name='cmd' value='_cart'>
    <input type='hidden' name='upload' value='1'>
    <input type='hidden' name='return' value='http://www.xx.com'>
    <input type='hidden' name='business' value='xx@x.com'>
    <input type='hidden' name='currency_code' value='USD'>
    
    ////Item 1
    <input type='hidden' name='item_name_1' value='item title 1'>
    <input type='hidden' name='amount_1' value='4.99'>
    <input type='hidden' name='quantity_1' value='1'>
    
    ////Item 2
    <input type='hidden' name='item_name_2' value='item title 2'>
    <input type='hidden' name='amount_2' value='6.99'>
    <input type='hidden' name='quantity_2' value='1'>
    
    ////Shipping Charges
    <input type='hidden' name='handling_cart' value='4.99'>
    The problem

    We are not able to update the quantity of the items purchased in our database (stock control) since we do not recieve any confirmation message, what we need is to recieve the item id number and quantity. After reading i found that we can use the notify_url to solve this problem! is this correct? if so, is the line below is correct?


    Code:
    <input type='hidden' name='notify_url' value='http://www.xx.com?page=process&id=12,12-25,12'>
    Looking forward to your reply,
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    is this PayPal specific? what's notify_url? It's not PHP known noun.

    I think asking PayPal about their API would be more appropriate, afterall, they're the ones that built it. :)


    Dan

    Comment

    • mfaisalwarraich
      New Member
      • Oct 2007
      • 194

      #3
      Hi,

      As far as i understand your problem is that you need to know the quantity ordered and if transaction was successful you want to update your database accordingly.

      I think you should make an invoice in your database and and then send its id in the Paypal Form and upon succcessful transaction match that ID in your database.

      PayPal returns data back to your site via what they call IPN. Its really just a callback to a URL you specify. You can set this URL via the variable notify_url you can send to PayPal.

      You can send your invoice id in the notify URL.

      More on notify url:

      Comment

      Working...