Discount using promotion code
I have no experience in developing an e-commerce site (adding carts, paypal, etc). So please have patience.
I got a client who already has a small e-commerce website running. He just wants to add a small feature to it. Basically he wants, when visitors enter a Promotion Code on the site they should get a discount (ex: discount of $10 & if product price is $100, then they should be charged $90 & this money should be transferred to client's paypal merchant's account).
I understand that it should go in the manner:
"We can put a promotion code box on website & ask visitor to enter the CODE if they have any. Once they enter it, we can match it with the original code (saved in database) and once it matched we can give them discount on next page."
The thing is how to execute it with PayPal? Back-end programming is not my Forte but I don't want to let my client know this & go away.
Any help would be highly appreciated.