?
Solved

Paypal button does not submit

Posted on 2013-02-02
10
Medium Priority
?
339 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
[X]
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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…
Suggested Courses

765 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