Welcome to WebDesignForums.net!
You're currently viewing WDF as a guest. By registering for a free account, you'll be able to participate with other members in our friendly community. Being a member allows you to ask questions and get answers for those troublesome web development tasks!

In addition, as a member you'll be able to post your websites up for review. Using our unique website review system you can gain some amazing feedback from some of the best web developers around. This is a completely free service to all registered members.

Ready to register yet? Registration is 100% free. Click Here To Join Now!

Form Integration with PayPal

Discussion in 'PHP' started by MVerminski, Mar 15, 2012.

  1. Offline

    MVerminski New Member

    Message Count:
    9
    Likes Received:
    1
    Trophy Points:
    1
    Gender:
    Male
    Is it possible to use an HTML form with PayPal? Here's what I need to do..

    Need a form to pass along this info

    Student:
    Phone:
    Job:
    School:
    House:
    Pose:

    In the same form will be six portrait packages in a dropdown menu from paypal along with the ability to purchase additional single prints which I haven't yet figured out how I want to do.

    The form information as well as the PayPal order need to be sent together in one e-mail so my company has everything in one place. The order will be printed and passed through three departments (retouching, printing, shipping) before it is completed. All the info is needed to pass through these departments without an issue.

    Any help would be appreciated.


  2. Offline

    mlseim WDF Staff

    Message Count:
    5,479
    Likes Received:
    224
    Trophy Points:
    63
    Gender:
    Male
    Location:
    Cottage Grove, Minnesota
    I would do it this way ... but not necessarily the way to go ...

    I would have the users register and login.
    That way, you use MySQL to let them build their package and profile.
    When they want to order, use PayPal IPN to process the transaction, and
    a successful (payment) return back from PayPal is also updated in the
    user's profile. Any admin, or department, will know which orders are
    in process, paid for, and the status of them all along the way. Even
    the customer can log in and see their order status. If their PayPal
    payment failed for any reason, that is also recorded in their status.

    PayPal IPN:
    http://www.google.com/search?q=paypal ipn example&btnG=Search

    The only time they leave your site is when they actually "pay for the package".
    They are sent to PayPal to enter their name, CC number, and automatically
    gets sent back to your site.

    My main reason for having them log-in and create their package is this:
    They can spend a couple of days deciding. Going in picking, coming back
    the next day, looking again, picking more. Their profile remains active
    until they decide to "buy the package". Then, the process moves on to
    the other departments.

    No emails involved except for some "confirmation and status". Using emails
    to send the info to various people is a bad idea. The customer may want to
    change something, or make a mistake, and the email is already sent. It will
    be confusing to resend emails with changes. Email is always a bad idea.


  3. Offline

    Webzarus Well-Known Member

    Message Count:
    3,000
    Likes Received:
    664
    Trophy Points:
    113
    Gender:
    Male
    I agree with msliem something with so many possible options should always be written to a DB.

    PayPal is just a payment system, they don't care what you sell or how much for... all they really want you to do is to ( as a developer ) is send them a $$$ amount and your account ID ( which is buried in the pay now button code )... and as msliem stated, once the payment is completed, paypal will redirect the user back to your site.

    Yes this could be done with just HTML, but if the user leaves the site for any reason, when they return they will have to go back through all the selection processes. Even if using javascript cookies to save this information... failure happen...

    The more information you can keep control over during their selection process, the less chances of errors... then there is the "returning" clients that had purchased before... and the up selling / cross selling opportunities are all missed if you don't use a DB.

    Then there is the fallback to the DB in case for some strange reason the person either mis-types THEIR email address, or god forbid a mail server somewhere goes down and can't deliver the email.

    once the info is in the DB, you can run a script ( at your control ), to generate emails to whomever you want using the information from the DB... these can be a simple page that only you know about, or can be setup as a CRON job to run n a schedule.

    Just my opinion.


  4. Offline

    MVerminski New Member

    Message Count:
    9
    Likes Received:
    1
    Trophy Points:
    1
    Gender:
    Male
    I thought about a DB, but I have no idea how to even begin that process. It sounds like it would be a lot easier once it's set up, but I've never done anything like this before. All I have done is basic HTML/CSS sites with some basic JavaScript and a little PHP.

    I'm working on this all by myself so I don't even have anyone to kind of help me along in the process. Everyone goes home and I literally sit in a room by myself for 2 hours. Maybe I should pull out some of my school books and see if I can find some information.

    What type of database would you suggest to use? I think the company that hosts the site might offer some kind of database, but again I don't think I'd even know where to begin setting it up.

    Maybe I'm in over my head and should just tell them I can't do it and to stop being cheap and hire an actual programmer. I wanted to get some more experience but I don't think this is something I can do by myself.


  5. Offline

    Webzarus Well-Known Member

    Message Count:
    3,000
    Likes Received:
    664
    Trophy Points:
    113
    Gender:
    Male
    And I couldn't do my first DB until I did it...

    If you know HTML, CSS and a little php then you're good...

    Contact your hosting provider. See what DB they have to offer and see about getting access to it... Most decent hosting providers offer a MySql DB, and most hosting packages offer at aleast the ability to create a couple of DB's.

    Head on over to w3schools.com, take a look at the section about php on inserting and or updating records. You may be surprised on how easy it is...

    Of course you can always come back here and ask questions... Hope they are paying you OT to learn...


  6. Offline

    MVerminski New Member

    Message Count:
    9
    Likes Received:
    1
    Trophy Points:
    1
    Gender:
    Male
    Yes I'm getting OT, and the website is hosted through a local company using Plesk Parallels. I created a new MySQL database and added myself as the default user. I guess I'll research some after work tonight and see what I can do. I'm sure I will be posting threads on here to get some help. Thank you very much


  7. Offline

    mlseim WDF Staff

    Message Count:
    5,479
    Likes Received:
    224
    Trophy Points:
    63
    Gender:
    Male
    Location:
    Cottage Grove, Minnesota
    The register/confirm/login part is already done using this free script:
    http://php-login-script.com/

    You can download it and customize it. They provide the MySQL query to
    set up the MySQL table. You need to customize that also, adding more
    columns to that ... like the list you made in post #1.

    If you start with that free script, and get it installed and working, you can use
    their "user profile" part as your client profile. Add some more columns for status,
    payment stuff, paypal stuff, timestamps, etc. I can visualize it in my head, but
    without actually doing it, I can't determine what columns will be needed to start with.

    At any time during your scripting, you can add or delete MySQL columns as you need to.

    It is almost impossible to learn PHP/MySQL through this forum. We can answer
    troubleshooting questions, but we can't execute or test any scripting you show us.
    We just look at it and see if there's an obvious scripting problem.

    I think this site is a good place for beginners to learn:
    http://www.tizag.com/mysqlTutorial/

    They seem to move at a good pace. Google is the next place: php mysql tutorial

    You don't need to spend any money on books or scripts. Everything you need should
    be found online (google it). Also, do your editing using notepad++:
    http://notepad-plus-plus.org/

    Notepad++ is free and is a great editor. It numbers the lines, highlights with color, etc.

    EDIT:
    I found this site:
    http://www.geekality.net/2011/05/28/php-tutorial-paypal-instant-payment-notification-ipn/

    That looks like a nice tutorial for PayPal IPN


  8. Offline

    mlseim WDF Staff

    Message Count:
    5,479
    Likes Received:
    224
    Trophy Points:
    63
    Gender:
    Male
    Location:
    Cottage Grove, Minnesota
    Let's move this thread to the PHP section of the forum.
    PHP would be a better place to discuss your project.


  9. Offline

    MVerminski New Member

    Message Count:
    9
    Likes Received:
    1
    Trophy Points:
    1
    Gender:
    Male
    I think I'm in over my head on this one haha I'll look at the references and see what I can do after hours today. I've set up a database before with a simple form for one of my classes, but I never got it to work properly. It wouldn't update the information from the form into the database.

    At least I have a little knowledge going into this. Thanks guys.


  10. Offline

    Webzarus Well-Known Member

    Message Count:
    3,000
    Likes Received:
    664
    Trophy Points:
    113
    Gender:
    Male
    You're already ahead of the game ( not TheGame ), but you have an understanding...

    SQL is a tricky thing at first... I've been using it for years using ASP and oracle and MySQL DB's.

    Making the time to learn some PHP ( enough to make me dangerous )...

    It's tough learn anything using a hosted server for testing... I downloaded WAMP about a month ago, making learning 1000 times easier...

    WAMP = Windows - Apache - MySQL - PHP environment that you can run on your local machine for development and testing... It has all the modules and interfaces you need for running an environment similar to your hosting environment...

    If you're running IIS on your machine, you will need to turn it off and stop the service to get WAMP to work on your machine.. But it does make learning a lot easier.


  11. Offline

    MVerminski New Member

    Message Count:
    9
    Likes Received:
    1
    Trophy Points:
    1
    Gender:
    Male
    I have WAMP at home and used it for the project I mentioned. I'm not sure if I'd be able to download it here at work or not.

    Also, we have an in house database that was set up before I started working here where all of the orders are entered and tracked so when customers call our customer service reps can tell them the status of their orders, change what they order, etc.

    One of my old classmates suggested JotForm to do what I want. I might give that a try since all of the orders get printed anyways and it should be something I can get done pretty quickly. Originally they wanted me to be done by the end of next week, so if anything it will hopefully be a temporary system to use until I can figure out setting up the database, a way for the rest of the building to access/edit it, or maybe just stick with JotForm if everyone here likes it.

    You kind of have to work here to understand, but we don't have the best systems for anything we do. Everything seems outdated, mostly because the owners are tight with money and don't want to pay to redo things/change things. For example our main server crashed a few years ago so now we use a souped up PC with about 20 external hard drives to store all of our images on and thats our network here in the lab...


  12. Offline

    mlseim WDF Staff

    Message Count:
    5,479
    Likes Received:
    224
    Trophy Points:
    63
    Gender:
    Male
    Location:
    Cottage Grove, Minnesota
    Owning a business pertaining to photos and photo packages, they had better be
    careful about reliability and secure storage. It's really hard to schedule an entire
    school grade to spend a day taking photos ... only to have it all be damaged or lost.

    I can't believe a real server and RAID storage could really be that expensive, especially
    for a business like that. It's part of doing business.

    Oh well ... good luck. I don't feel they are giving you the tools you need, nor the support.
    If I were you, I wouldn't do the project. It's too important from a business aspect to get
    it right, make it secure, make it reliable, and to not lose any business or customers.

    You should still learn PHP/MySQL, web development ... but do it on your own time and terms.


  13. Offline

    MVerminski New Member

    Message Count:
    9
    Likes Received:
    1
    Trophy Points:
    1
    Gender:
    Male
    I agree with you. The RAID storage is what we lost about three years ago and they switched to XHD's because it's cheaper. I definitely don't have the tools nor support. Basically the owner approached me asked if I was done with school and would be interested in working OT to build an order form for portraits. That's the last time I have talked to him or even seen him here lol.

    I've been considering saying it's not something I can do and now that I see you have to pay to use JotForm for what we would need it for I'm probably (I'd still like to give it a shot and see how I do) just going to save myself a lot of headache and suggest they hire someone who isn't straight out of college and has done something like this before. It'd be easier for me and for them.


  14. Offline

    mlseim WDF Staff

    Message Count:
    5,479
    Likes Received:
    224
    Trophy Points:
    63
    Gender:
    Male
    Location:
    Cottage Grove, Minnesota
    I think you're making a wise choice by turning down this job.

    If the client was a different kind of person, and ran the business differently,
    I would say "go for it". And you should "go for it" with someone else later on, when
    something comes up. But, for this project ... run like the wind.

    You can gracefully back out by being honest and tell him that it's something that
    requires too much of a learning curve. You are not able to do a thorough and
    efficient job at this time. Make sure you deal with it as soon as possible.

    Don't mention anything about his "lack of spending", or how bad his system is,
    take the high road and let him know how much you respect him, and that he deserves
    to have his programming done in the most professional and efficient manner. It will
    save him a lot of money in the long term. It's all about saving him money and providing
    him with the best system he can have ... he will understand dollars, but not much else.

    Good luck and keep us posted on how it goes.


  15. Offline

    MVerminski New Member

    Message Count:
    9
    Likes Received:
    1
    Trophy Points:
    1
    Gender:
    Male
    I talked to him about it earlier today. He doesn't want to use PayPal because "they take your money" so all I have to do is make an email form with required fields and then our accountants are going to charge the credit card once they have the form in their e-mail. Definitely not the best or right way to do it, but it makes my life easier and the rest of the system can remain the same for everyone else in the building.

    He also told me to make sure the site is secure, but if I'm not mistaken isn't that through VeriSign or similar companies and doesn't that cost money too? lol


  16. Offline

    Webzarus Well-Known Member

    Message Count:
    3,000
    Likes Received:
    664
    Trophy Points:
    113
    Gender:
    Male
    Sending credit card info through email is about as secure as putting all that info on a post it note and hanging it out by the street.

    I run a firewall that captures every smtp email coming and going on several client sites... SMTP is a general mail protocol...that is extremely insecure...

    If the customers credit card gets compromised, and the credit card company want to hang someone and charge them for losses. They will come after you company if they determine this information was sent via email.

    Yes a secure certificate secures the information being transmitted on the site... But once it goes into email... It's not covered by SSL... SSL only protects information using the https protocol... Not smtp ( which is email )... There is no secure way to transmit email short of some elaborate encryption scheme using public and private keys to encrypt the email... And then having someone with the keys to open the emails...last time I checked on that, you have to be on a private server ( more money ), or own your own web server co located somewhere...

    My personal opinion... I know you want to learn... But walk away from this project... If the owner is willing to risk his customers information to save a few bucks.... Walk away... Pay pal is the cheapest and easiest way to SECURELY transmit customer transactions. If he can process credit cards he probably already has a MERCHANT ACCOUNT where you can tie this thing into... But they charge just as much or more than pay pal... Unless you are making like a 1000 transactions a month...

    Use the merchant account, pay pal, or walk away... He's not going to get a knowledgeable web designer to touch this ... Using email to send credit card info...


  17. Offline

    mlseim WDF Staff

    Message Count:
    5,479
    Likes Received:
    224
    Trophy Points:
    63
    Gender:
    Male
    Location:
    Cottage Grove, Minnesota
    As I stated before, and as Webzarus says .... walk away.

    He doesn't understand it, he doesn't know what he wants, and any failures that
    occur ... you will be "thrown under the bus". If there is no database, no logins,
    no user profiles, no online payments ... there is no reason to even have the
    website. He is basically doing business the same way he is right now.

    The website could be such a useful tool ... they could watermark photos on the
    fly and let clients view them on their smartphones ... show their friends, do some
    FaceBook things. That would entice relatives to order packages themselves of
    the real photos (not watermarked). Done properly, the website could be the
    greatest thing for his business.

    Think of all the family and friends that live far away ... they could view the photos
    and purchase sets for themselves. If the parents have multiple children photographed
    by this guy's company, it would be all held together as a family.


  18. Offline

    Webzarus Well-Known Member

    Message Count:
    3,000
    Likes Received:
    664
    Trophy Points:
    113
    Gender:
    Male
    My oldest daughter has a friend who has been a professional photographer for several years... She did pretty good for herself.... I setup her original site... She got a few new customers...

    I actually encourage her to use a developer friend at the time ( I was tied up with several other projects, and he needed some work ), he did pretty much everything msleim is saying, allowing people to view watermarked photos... Send links to thes pictures to family and friends, etc...

    She has gotten so many new clients and her referral sales are through the roof... All she does is upload low resolution images to the site... Assign the client... All the clients send links to their family and friends... They do ALL THE REFERRAL WORK, she no longer has to knock on doors anymore... She told my daughter the other day she was looking to hire a couple of interns to help with the workload and let her mom take a break from filling orders...

    Just a thought.


  19. Offline

    MVerminski New Member

    Message Count:
    9
    Likes Received:
    1
    Trophy Points:
    1
    Gender:
    Male
    He has an idea of putting the "proofs" as we call them on the website so the students can see them and order online, but yeah I agree with you about the PayPal and insecure stuff. I'm going to make the form anyways and warn him about it and see what he says. The only reason I'm not walking away now is after I spoke with him late this afternoon he told me he wants me to revamp/design the entire site and add more interactivity to it.

    What he has basically done is looked at other companies sites who do what we do (make composites for colleges/other organizations) and has told me to add this or that from these other sites to make ours more appealing and interactive. Pretty much just taking other peoples ideas lol

    If I do well him and his wife (co-owners) as well as my manager told me there is a lot more web/print/graphics work to be done if I want to make the extra money doing OT. It will hopefully give me some nice things to add to my portfolio as I continue to look for a new job to get out of that place haha

    You have to know this guy to fully understand how he is with money. It's ridiculous and I should have seen this coming before I even said yes I'll do it.

    I just love working on websites and I haven't had anything to do for a few months so I'm going to try to tough it out and do some work and hope everything turns out okay.


  20. Offline

    MVerminski New Member

    Message Count:
    9
    Likes Received:
    1
    Trophy Points:
    1
    Gender:
    Male
    I also want to thank you guys for all the responses. I know I'm new here, but I appreciate it. I've posted on other forums in the past and this one is becoming my favorite because you actually get GOOD and KNOWLEDGEABLE responses.


    AlphaMare likes this.

Share This Page