> You could do it by just making a mail handler and prompting the people > to pay via paypal before you register the code... the mail handler > should pre-calc all fees send the user over to PayPal.. then you wait > for the user to make payment.... if you don't want to wait for the user > to make payment, you can screen-scrape the paypal screen by simulating > https posts and periodically check your "account activity"... the > paypal payments should have the domain name and a tracking number so > you can match them up... if it's an eCheck, the mail handler can dump > it into a queue that can be processed by a cron, if it's an instant > payment then you process the registration and kick off your thank you > notice... if it's an unverified address, you can screen-scrap again and > POST the "Accept" button... > > I would advise against doing this method, but it is definately > possible, I use this method for my online card shop but hey, those are > cards and they are not time critical as domain names are.
A much better approach would be to use the PayPal merchange online service. There's docs on the PayPal web site. The customer uses your site to select what they want to purchase, then when they're ready to complete the transaction, you refer them to a PayPal page that has all the details already filled in for their convenience. When they authorize the transaction with PayPal, PayPal will make an encrypted connection to your web server with a POST request to confirm that the funds were transferred to your account. Your server can use this to complete the transaction with OpenSRS. This can all be done in real time. I haven't yet tried to implement this, so I don't know how well it will work in practice. But in theory it sounds good.
