credit card form integration with Paypal API

Last post 09-05-2008 2:21 PM by bradoyler. 6 replies.

Sort Posts:

  • credit card form integration with Paypal API

    01-16-2008, 5:56 PM
    • Loading...
    • bradoyler
    • Joined on 07-21-2002, 10:56 AM
    • Philadelphia, PA
    • Posts 203

    I have a standard credit card form that I need to integrate into Paypal API . I've tried the Paypal API samples HERE and I can't seem to get them to even work. Honestly, they seem way too distracting and overly complicated to be called "samples".

    Anyone have a simple example that uses a simple form in an aspx page?   Thanks.

    Brad Oyler
    W3Portals.com


    DotNetNuke Bronze Benefactor
    Filed under: , ,
  • Re: credit card form integration with Paypal API

    01-16-2008, 6:05 PM

    Which PayPal method are you looking to use?

    Robert Roati
    Media Storm Studio
    www.designwithattitude.com
    VB/C++/C#/ASP/.NET
  • Re: credit card form integration with Paypal API

    01-16-2008, 6:44 PM

    if you are using payflow pro then Rick Strahl has a nice tutorial on how to use it.

    http://www.west-wind.com/presentations/aspnetecommerce/aspnetecommerce.asp

  • Re: credit card form integration with Paypal API

    01-16-2008, 7:03 PM
    • Loading...
    • bradoyler
    • Joined on 07-21-2002, 10:56 AM
    • Philadelphia, PA
    • Posts 203

     Paypal Websites Pro (US) , and more specifically "DoDirectPayment"

    Brad Oyler
    W3Portals.com


    DotNetNuke Bronze Benefactor
  • Re: credit card form integration with Paypal API

    01-20-2008, 12:14 PM
    Answer
    • Loading...
    • bradoyler
    • Joined on 07-21-2002, 10:56 AM
    • Philadelphia, PA
    • Posts 203
    I believe this is what I need... 
    using System;
    using System.Net;
    using System.Text;
    using System.IO;
    
    public partial class NVP_SetExpressCheckout : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //API Credentials (3-token)
            string strUsername = "sdk-three_api1.sdk.com";
            string strPassword = "QFZCWN5HZM8VBG7Q";
            string strSignature = "A21eW1ch..NEqJJ-glaLhqkBMlzeAsWqX0ycck-CTc0tKI4pa1u.rgNF";
            string strCredentials = "USER=" + strUsername + "&PWD=" + strPassword + "&SIGNATURE=" + strSignature;
    
            string strNVPSandboxServer = "https://api-3t.sandbox.paypal.com/nvp";
            string strNVPLiveServer = "https://api-3t.paypal.com/nvp";
            string strAPIVersion = "2.3"
    
    string strNVP = strCredentials + "&METHOD=DoDirectPayment&CREDITCARDTYPE=VISA&ACCT=4683075410516684&EXPDATE=092007&CVV2=808&AMT=212.95&FIRSTNAME=Designer&LASTNAME=Fotos&IPADDRESS=255.55.167.002&STREET=1234+Easy+Street&CITY=San+Jose&STATE=CA&COUNTRY=United+States&ZIP=95110&COUNTRYCODE=US&PAYMENTACTION=Sale&VERSION=" + strAPIVersion;
            //Create web request and web response objects, make sure you using the correct server (sandbox/live)
            HttpWebRequest wrWebRequest = (HttpWebRequest)WebRequest.Create(strNVPSandboxServer);
    
            //Set WebRequest Properties
            wrWebRequest.Method = "POST";
    
            // write the form values into the request message
            StreamWriter requestWriter = new StreamWriter(wrWebRequest.GetRequestStream());
            requestWriter.Write(strNVP);
            requestWriter.Close();
    
            // Get the response.
            HttpWebResponse hwrWebResponse = (HttpWebResponse)wrWebRequest.GetResponse();
            StreamReader responseReader = new StreamReader(wrWebRequest.GetResponse().GetResponseStream());
    
            // and read the response
            string responseData = responseReader.ReadToEnd();
    
            responseReader.Close();
            Response.Write(Server.UrlDecode(responseData));
        }
    }
     
    Brad Oyler
    W3Portals.com


    DotNetNuke Bronze Benefactor
  • Re: credit card form integration with Paypal API

    01-26-2008, 1:05 PM
    • Loading...
    • qhyzme
    • Joined on 10-16-2007, 3:19 AM
    • Posts 4

    i'm struggling with this problem, integrating paypal dodirectpayment and express checkout with my website. can you please help with this, i really need to integrate paypal with my website.

    i am new with asp.net and current using vb. c# code will do, i'll try to convert it to vb using code converter available on the net.

     

    thanks in advance,

    qhyzme

  • Re: credit card form integration with Paypal API

    09-05-2008, 2:21 PM
    • Loading...
    • bradoyler
    • Joined on 07-21-2002, 10:56 AM
    • Philadelphia, PA
    • Posts 203
    Brad Oyler
    W3Portals.com


    DotNetNuke Bronze Benefactor
Page 1 of 1 (7 items)
Microsoft Communities
Page view counter