Solved

How to Integrate PayPal Payment in my website

Posted on 2011-02-23
2
840 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
[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
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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