Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Paypal Express Checkout Using .Net and VB

Posted on 2011-02-27
1
Medium Priority
?
1,297 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 2000 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

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!

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

604 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