?
Solved

Paypal Express Checkout Using .Net and VB

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
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…
Suggested Courses

770 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