Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Paypal button does not submit

Posted on 2013-02-02
10
332 Views
Last Modified: 2016-03-24
I generated a PayPal payment button from the PayPal website and dropped the button onto my page and nothing happens when I click the button.  What am I doing wrong?  Where do I begin?

Here is the button.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="1234567">
<table>
<tr><td><input type="hidden" name="on0" value="MyService">My Service</td></tr><tr><td><select name="os0">
<option value="Category1">Product 1 $65.00 CAD</option>
<option value="Category2">Product 2 $140.00 CAD</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="CAD">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Open in new window


Thanks.
0
Comment
Question by:DanielAttard
  • 5
  • 4
10 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 38847297
line 11, replace :  name="submit"
by :  name="mysubmit"

in you put your form in an iframe :
line 1, replace :
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
by :
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
0
 

Author Comment

by:DanielAttard
ID: 38847312
Thanks leakim971, I think there is a type in your comment.  What is it you are telling me about iframe?
0
 
LVL 82

Expert Comment

by:leakim971
ID: 38847313
do you have your paypal form inside an iframe?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:DanielAttard
ID: 38847314
No, I don't.  Not familiar with iframe.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 38847321
so what about ?
line 11, replace :  name="submit"
by :  name="mysubmit"

Open in new window


You add jQuery and Javascript zone, please post your code
0
 

Author Comment

by:DanielAttard
ID: 38847323
I am trying to make a call to the paypal form inside this js function:

function() {    
    // need call to PayPal here, before myStep1 and myStep2 
    $.when.apply(undefined, myStep1()).done(function () {
    $.ajax({
        url: sURL + "myController/myStep2",
        success: function() {  
                $.msg("Success Message", live:10000
                });
            },
        error: function(){
                $.msg("Error Message", live:10000
                });
            }
        }); 
    });
};

Open in new window


This is the paypal form that I am trying to implement, but the form does not submit when I click the button:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_s-xclick">
  <input type="hidden" name="hosted_button_id" value="123456789">
  <input type="image"
      src="https://www.paypalobjects.com/en_US/i/btn/btn_paynow_SM.gif"
      border="0" name="submit"
      alt="PayPal - The safer, easier way to pay online!">
  <img alt="" border="0"
      src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1"
      height="1">
</form>

Open in new window


Any ideas why my form does not submit?
0
 
LVL 82

Expert Comment

by:leakim971
ID: 38847329
Any ideas why my form does not submit?
Not really, sorry...
Please wait help from other EE members
0
 

Author Comment

by:DanielAttard
ID: 38847335
Ok, thanks anyway.  Frustrating afternoon for me  . . . .
0
 
LVL 14

Accepted Solution

by:
dejaanbu earned 500 total points
ID: 38847997
but the form does not submit when I click the button:

i just copied your code and accessed the page, i am redirected to paypal results, i mean the page is submitting on click of the image.

can u give more detail?

also, i would recommend using Sandbox first, then later after everything get succeeded, u can move to live paypal. so try creating sandbox hosted button first, then change the url to "https://www.sandbox.paypal.com/us/cgi-bin/webscr" and then test everything..
0
 

Author Closing Comment

by:DanielAttard
ID: 38900526
Thanks for the suggestion to use the sandbox mode.  This helped me solve the problem.  Thanks.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Html form and modal / img src -problem 3 28
how can i get 4 nd 5 ? 3 31
I have a few questions about using the Google Developer's Console. 4 36
Insert Button on a table 16 36
Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question