Solved

How to Integrate PayPal Payment in my website

Posted on 2011-02-23
2
835 Views
Last Modified: 2012-05-11
I need to open a Paypal payment form from my web page.

Then I need to be redirected from PayPal back to the page that called the Paypal payment form.

I need the PayPal response information to determine if the payment was accepted.

I use the RegisterExpired.aspx.cs form to call the PayPal payment form

 protected void cmdRenew_Click(object sender, EventArgs e)
    {
        //try
        // {
            //Response.Redirect("~/PaymentForm.htm");
            Response.Redirect("~/Payment.aspx");
        //PaymentForm.htm
            //return "Process OK";
        //}

I am confused. Should I be calling the htm or the aspx?

PaymentForm.htm

<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="4078972"/>
<table>
<tr><td><input type="hidden" name="on0" value="You will have a choice of paying by PayPal"/>
You will have a choice of paying by PayPal</td>
</tr><tr><td>
<input type="hidden" name="os0" /></td></tr>
<tr><td><input type="hidden" name="on1" value="or paying by credit card"/>
or paying by credit card</td></tr><tr><td>
<input type="hidden" name="os1" /></td></tr>
</table>
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif"
name="submit" alt="PayPal - The safer, easier way to pay online!"/>
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"/>
</form>

This goes to PayPal. https://www.paypal.com/cgi-bin/webscr

However when I click the Cancel and Return to David Martin LLC

I get the following error.
Internet Explorer cannot display the webpage

https://www.paypal.com/us/cgi-bin/webscr?SESSION=Fp48FD7EYx4ksmO8uGknmvELGByCJ38geoXcdjtq_My56C0mke6gH8m8aE0&dispatch=5885d80a13c0db1f8e263663d3faee8d61ec37c409b56235bed2ddf64505aee9

Can you refer me to documentation that explains the process?

Thanks,

0
Comment
Question by:Dovberman
2 Comments
 
LVL 4

Accepted Solution

by:
racastillojr earned 500 total points
ID: 34967267
When you create the paypal button, there is a section that asks you to put the url you want the user to be redirected to if they cancel the order. They also have a section that ask your for the url after they pay.

Those options are located in "step 3 Customize advanced features (optional)"  of the Create Paypal payment button".

So for example, if you select Merchant service, the you try to create the buy now button, you will see those options at the bottom of the page.
0
 

Author Closing Comment

by:Dovberman
ID: 34969971
Thanks,
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now