Photoshop Contest Forum Index - Ask the Experts - Coding website for use with PayPal - Reply to topic
TofuTheGreat
Location: Back where I belong.
|
Wed Dec 12, 2007 6:14 pm Reply with quote
Anyone here done website coding for payment processing via PayPal?
I've been asked to do this only the site doesn't use a shopping cart. Instead it's a bit like PSC's advantage payment. I want to pass the total amount to PayPal for payment and get back an authorization number (and whatever else I can).
I've got the PayPal Merchant account setup and I've printed off their API documentation. But I'm hoping someone here has the "summary version" of how to do this.
Oh and I'm having to code in ASP not ASP.Net or PHP.
_________________ Why I do believe it's pants-less o'clock! - Lar deSouza
”The mind is like a parachute, it doesn’t work if it isn’t open.” - Frank Zappa
Created using photoshop and absolutely no talent. - reyrey
|
NOGOODSK8RPUNK
Location: hum let me think, oh i know, if you look real hard i sometimes appear in your forum's text box
|
Wed Dec 12, 2007 8:35 pm Reply with quote
i only know how to generate the html for the links and icons to pay pal but i don't have the merchant info basically this places a paypal link on the site w/ out the shopping cart not sure if this is what you need tofu but if it is just pm me ok
|
splodge
Location: Yorkshire,
|
Wed Dec 12, 2007 9:12 pm Reply with quote
i had someone else set this up for me, basicly he laughed at me and set up 5 account links in 20 min's, dont ya just hate .ppl like that,
i think everything you need is on the paypal site, from the button to the code.
|
NOGOODSK8RPUNK
Location: hum let me think, oh i know, if you look real hard i sometimes appear in your forum's text box
|
Wed Dec 12, 2007 9:21 pm Reply with quote
does this help you out??? below are all the paypall codes i know ...
buy now using pay pall... location at start of page : <input type="hidden" name="no_note" value="1">
<input type="image" name="submit" src="http://images.paypal.com/images/x-click-butcc.gif" alt="Make payments with PayPal, it's fast, free, and secure!">
</form>
</div>
</body>
</html>
add to paypal cart... location at start of page : <input type="hidden" name="no_note" value="1">
<input type="image" name="submit" src="http://images.paypal.com/images/x-click-butcc.gif" alt="Make payments with PayPal, it's fast, free, and secure!">
</form>
</div>
</body>
</html>
view cart via pay pal... location and start of page : <input type="hidden" name="business" value="">
<input type="image" name="submit" src="http://images.paypal.com/images/view_cart.gif" alt="Make payments with PayPal, it's fast, free, and secure!">
</form>
</div>
</body>
</html>
subscription via pay pal.. location start of page : <input type="hidden" name="no_note" value="1">
<input type="image" name="submit" src="http://images.paypal.com/images/x-click-butcc.gif" alt="Make payments with PayPal, it's fast, free, and secure!">
</form>
</div>
</body>
</html>
Donations via pay pal... location start of page : <input type="hidden" name="no_note" value="1">
<input type="image" name="submit" src="http://images.paypal.com/images/x-click-butcc-donate.gif" alt="Make payments with PayPal, it's fast, free, and secure!">
</form>
</div>
</body>
</html>
|
TofuTheGreat
Location: Back where I belong.
|
Thu Dec 13, 2007 11:09 am Reply with quote
Hmmm... Okay maybe I was too vague.
I have the site built and I know how to put the buttons and logos on the page.
What I have to figure out is how to pass the dollar amount of the transaction to PayPal for the credit card processing and then get the authorization code for the payment back from PayPal to update my database. For the HTML forms I'm assuming I'll use the POST method on the form and get a query string back from PayPal.
I don't think I need a shopping cart as it's always going to be the same "thing" but with different prices (campsite reservations for anywhere from 2 to 14 nights).
Guess I actually have to read the API that I printed off.
_________________ Why I do believe it's pants-less o'clock! - Lar deSouza
”The mind is like a parachute, it doesn’t work if it isn’t open.” - Frank Zappa
Created using photoshop and absolutely no talent. - reyrey
|
TutorMe
Site Moderator
Location: Sitting in this room playing Russian roulette, finger on the trigger to my dear Juliet.
|
Thu Dec 13, 2007 12:33 pm Reply with quote
Paypal has this service called Instant Payment Notification. You can use it to, for example, upon payment, change a users permissions. That may not make sense, so I'll try to elaborate.
Lets say you have a site with three user levels: user (1), advantage user (2), and admin (3). You can write a php script (or other type probably) that requests specific variables from paypal. So you could do something like:
Code: if ($payment_status == "Completed")
$user_level = "2";
else
echo "Payment failed.";
end if
This is just an example code, and it may not be the best way to do it. I have never actually used IPN, but I have looked at it. Hope this is helpfull.
EDIT: I just saw that you weren't using php, but maybe this will still give you an idea of how to do it.
EDIT 2; Look at this: https://www.paypal.com/us/cgi-bin/webscr?cmd=p/acc/ipn-info
TutorMe
|
TofuTheGreat
Location: Back where I belong.
|
Thu Dec 13, 2007 1:22 pm Reply with quote
Thanks Tutor! (apt name for this thread)
This looks to be EXACTLY what I was looking for. I'm was in too big a hurry to look through all this:
_________________ Why I do believe it's pants-less o'clock! - Lar deSouza
”The mind is like a parachute, it doesn’t work if it isn’t open.” - Frank Zappa
Created using photoshop and absolutely no talent. - reyrey
|
|
Thu Dec 13, 2007 1:28 pm Reply with quote
I reccomend using PHP. It is much more useful than HTML. Are you simply trying to direct them to Paypal to make the purchase, or are you actually trying to send the order through Paypal but never leave the site?
|
TofuTheGreat
Location: Back where I belong.
|
Thu Dec 13, 2007 1:38 pm Reply with quote
ResidentGeek wrote: I reccomend using PHP. It is much more useful than HTML. Are you simply trying to direct them to Paypal to make the purchase, or are you actually trying to send the order through Paypal but never leave the site?
I'd love to use PHP but the IT Director and Network Administrator require that I continue development in ASP (since that's what 95% of the site is in). Plus I'm still learning PHP myself.
As to the payment flow; initially the customers will be passed off to PayPal to pay by credit card and then back to the original site to finish processing the reservation.
Eventually I'll integrate payment right within the original site. But I need to get this up and running fairly quickly.
_________________ Why I do believe it's pants-less o'clock! - Lar deSouza
”The mind is like a parachute, it doesn’t work if it isn’t open.” - Frank Zappa
Created using photoshop and absolutely no talent. - reyrey
|
|
Thu Dec 13, 2007 1:57 pm Reply with quote
Tell your IT folks to go screw ASP and get yourselfs on a controlled UNIX system. Drop the Windows base and jump ship. I'm a web developer for a corporate business and we made the mistake of trying to use ASP for most of our site. Spend the money to get it converted to CSS and SHTML. Then use PHP for all the dynamics.
Seriously. ASP is so screwed up it's not funny. I'm never touching the stuff again, I suggest you don't either.
PS. It takes a bit longer to style to your site, but I highly suggest using osCommerce to do your online transactions.
www.oscommerce.com
check it out. Let me know how things turn out!
EDIT:
If you pass them to Paypal, you will have no control on where they go after that. They may never come back, and you have no way of telling what happens. Sign up for google analytics and use that on your site.
PayPal has an API that can be incorporated into the site and have your information passed through it. It requires that your site have an SSL Cert though. Do you have one for your site?
|
TutorMe
Site Moderator
Location: Sitting in this room playing Russian roulette, finger on the trigger to my dear Juliet.
|
Thu Dec 13, 2007 2:03 pm Reply with quote
ResidentGeek wrote: If you pass them to Paypal, you will have no control on where they go after that. They may never come back, and you have no way of telling what happens. Sign up for google analytics and use that on your site.
PayPal has an API that can be incorporated into the site and have your information passed through it. It requires that your site have an SSL Cert though. Do you have one for your site?
I believe you do have control on whether or not they come back if you use Instant Payment Notification.
Could be wrong though.
|
|
Thu Dec 13, 2007 2:23 pm Reply with quote
Unless Paypal gives you an option to redirect them to a given URL after sending money to your account, you won't be able to make them come back.
One option would be to redirect them to PayPal in a new window. Then when they are done, they'e never actually LEFT.
For a simple and sweet solution, you might try that.
|
TofuTheGreat
Location: Back where I belong.
|
Thu Dec 13, 2007 2:47 pm Reply with quote
TutorMe wrote: ResidentGeek wrote: If you pass them to Paypal, you will have no control on where they go after that. They may never come back, and you have no way of telling what happens. Sign up for google analytics and use that on your site.
PayPal has an API that can be incorporated into the site and have your information passed through it. It requires that your site have an SSL Cert though. Do you have one for your site?
I believe you do have control on whether or not they come back if you use Instant Payment Notification.
Could be wrong though.
Yes we have an SSL certificate. And, from what I've read, the IPN from PayPal will return information to your site when the payment is processed. Part of the functionality is that you must, in turn, return validation information to PayPal after the payment notification in order to validate the payment. When you sign up for IPN you must put in a URL that will provide the payment verification. So the customer may leave the site but the payment is still processed.
In my situation; if the customer doesn't come back to the site then they don't get the option of printing their confirmation. Any confirmation that's not printed will be flagged on the in-office system and the office staff will either print or email the confirmation to the addresses recorded for the reservation.
_________________ Why I do believe it's pants-less o'clock! - Lar deSouza
”The mind is like a parachute, it doesn’t work if it isn’t open.” - Frank Zappa
Created using photoshop and absolutely no talent. - reyrey
|
|
Thu Dec 13, 2007 3:56 pm Reply with quote
OK, sounds like that should work. I've never coded a Paypal payment method so I can't really help you there.
I still stand firm in what I said though. Ditch the windows system, and ditch ASP. It's more trouble than it's worth.
(PayPal's method is probably written in PHP. Chances are that you'll have to contact them directly to find out how to integrate it into ASP.)
Good luck!
|
Photoshop Contest Forum Index - Ask the Experts - Coding website for use with PayPal - Reply to topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|