Solved

Paypal Express Checkout Using .Net and VB

Posted on 2011-02-27
1
1,289 Views
Last Modified: 2012-05-11
Hi,

I am trying to integrate the code for Paypal Express Checkout, just for people with paypal accounts as we also have our own credit card payment mehtod. The integratror here - https://www.paypal-labs.com/integrationwizard/ecpaypal/main.php

Unfortunatly this takes a lot to be desired with spelling errors, undefined variables etc.

I believe the code attached is correct for the first step calling NVPAPICaller() but when it goes to the sandbox testing area it only shows the Paypal default address and not the one I have defined.

Any help would be apprecaitted.

Kind Regards
Karl
 
Dim test As New NVPAPICaller()

        Dim retMsg As String = ""
        Dim token As String = ""

        Session("payment_amt") = 21.99
        Session("Payment_Amount") = 21.99

        If Session("payment_amt") IsNot Nothing Then
            Dim amt As String = Session("payment_amt").ToString()

            'Optional Shipping Address entered on the merchant site 
            Dim shipToName As String = "test 1" '"<SHIPTONAME>"
            Dim shiptoStreet As String = "test 1" '"<SHIPTOSTREET>"
            Dim shiptoStreet2 As String = "test 1" '"<SHIPTOSTREET2>"
            Dim shipToCity As String = "test 1" '"<SHIPTOCITY>"
            Dim shipToState As String = "test 1" '"<SHIPTOSTATE>"
            Dim shipToZip As String = "test 1" '"<SHIPTOCITY>"
            Dim shipToCountryCode As String = "test 1" '"<SHIPTOCOUNTRYCODE>"

            Dim ret As Boolean = test.MarkExpressCheckout(amt, shipToName, shipToStreet, shipToStreet2, shipToCity, shipToState, shipToZip, shipToCountryCode, token, retMsg)
            If ret Then
                Session("token") = token
                Response.Redirect(retMsg)
            Else
                Response.Redirect("APIError.aspx?" & retMsg)
            End If
        Else
            Response.Redirect("APIError.aspx?ErrorCode=AmtMissing")
        End If

Open in new window

0
Comment
Question by:karlblackburn
[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
1 Comment
 
LVL 19

Accepted Solution

by:
Amandeep Singh Bhullar earned 500 total points
ID: 35292931
Check out the article
http://www.codeproject.com/KB/aspnet/paypal_c_aspnet.aspx

Hope this will help you
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 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