VB.NET and IP*Works CC ICharge w/ Authorize.net

Discussion in 'ASP.NET / ASP.NET Core' started by meadowstrav, Sep 8, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce,

    I did a little something like this and I am getting some weird results...

    Private Sub bCharge_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bCharge.Click

    If (Me.cardIsValid()) Then
    Icharge1.Gateway = System.Enum.Parse(GetType(nsoftware.IPWorksCC.IchargeGateways), "1")
    Icharge1.CardExpMonth = 12
    Icharge1.CardExpYear = 6
    Icharge1.CardNumber = "5424000000000015"
    Icharge1.InvoiceNumber = 9876
    Icharge1.MerchantLogin = "xxxxxxx"
    Icharge1.MerchantPassword = "xxxxxx"
    Icharge1.TransactionAmount = 16
    Try
    Icharge1.Authorize() ' DO AUTHORIZATION
    If (Icharge1.TransactionApprove) Then
    litOutput.Text += "Transaction Approved."
    Else
    litOutput.Text += "<font color='red'>Transaction Declined:</font> " + Icharge1.ResponseText
    End If
    Catch Ex As nsoftware.IPWorksCC.IPWorksCCException
    litOutput.Text += "Transaction Error: " + Ex.Message + "
    "
    End Try

    pnlAuthResults.Visible = True
    Me.Page.DataBind()
    End If

    End Sub

    Private Function cardIsValid() As Boolean
    'Lets preauthorize first:
    Icharge1.CardExpMonth = 12
    Icharge1.CardExpYear = 6
    Icharge1.CardNumber = "5424000000000015"
    Try
    litOutput.Text += "Pre-Authorization Status:

    "
    Icharge1.PreAuthorize()
    litOutput.Text += "<font color='blue'><i>Pre-Authorization checks passed. </i></font>

    "
    Return True
    Catch ex As nsoftware.IPWorksCC.IPWorksCCException
    litOutput.Text += "<font color='red'>Pre-Authorization checks failed: </font>" + ex.Message
    End Try

    Return False
    End Function

    ...My results are weird because it reads "Transaction Declined: *This transaction has been approved." and it also returned a response code of 1. How come the Icharge1.TransactionApprove returned false and not true if the response code was 1.

    Can someone tell me what is wrong?

    David Silva


    quote:Originally posted by bruce

    Did you download the helpfile yet?

    http://kb.discountasp.net/article.aspx?id=10103

    Also see the very simple snippet


    <%@ Page Language="VB" %>
    <%@ import namespace="nsoftware.ipworksCC" %>
    <script runat="server">

    Sub Page_Load()

    Dim iCharge1 as new nsoftware.IPWorksCC.ICharge()

    ' This line set the gateway to authorize.net
    iCharge1.gateway = System.Enum.Parse(GetType(nsoftware.IPWorksCC.IchargeGateways), "1")
    Icharge1.CardExpMonth = 12
    Icharge1.CardExpYear = 06
    Icharge1.CardNumber = "4111111111111111"
    Icharge1.InvoiceNumber = 9876
    Icharge1.MerchantLogin =
    Icharge1.TransactionAmount = 1


    End Sub


    </script>
    <html>
    <head>
    </head>

    <form runat="server">
    <!-- Insert content here -->
    </form>
    </body>
    </html>



    quote:Originally posted by meadowstrav

    Has anyone written a shopping cart written in vb.net and IP*Works CC ICharge that was integrated with PayFlow Pro or Authorize.net's payment services. I currently have a cart application that was based off of the IBuySpyStore. The only problem is that I am not sure how to integrate IP*Works CC ICharge with Verisign's payflow pro or authorize.net's payment services. Any help would be greatly appreciated.

    Thanks,

    djsilva46
    </blockquote id="quote"></font id="quote">
    </blockquote id="quote"></font id="quote">
     
  2. Has anyone written a shopping cart written in vb.net and IP*Works CC ICharge that was integrated with PayFlow Pro or Authorize.net's payment services. I currently have a cart application that was based off of the IBuySpyStore. The only problem is that I am not sure how to integrate IP*Works CC ICharge with Verisign's payflow pro or authorize.net's payment services. Any help would be greatly appreciated.

    Thanks,

    djsilva46
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    Did you download the helpfile yet?

    http://kb.discountasp.net/article.aspx?id=10103

    Also see the very simple snippet


    <%@ Page Language="VB" %>
    <%@ import namespace="nsoftware.ipworksCC" %>
    <script runat="server">

    Sub Page_Load()

    Dim iCharge1 as new nsoftware.IPWorksCC.ICharge()

    ' This line set the gateway to authorize.net
    iCharge1.gateway = System.Enum.Parse(GetType(nsoftware.IPWorksCC.IchargeGateways), "1")
    Icharge1.CardExpMonth = 12
    Icharge1.CardExpYear = 06
    Icharge1.CardNumber = "4111111111111111"
    Icharge1.InvoiceNumber = 9876
    Icharge1.MerchantLogin =
    Icharge1.TransactionAmount = 1


    End Sub


    </script>
    <html>
    <head>
    </head>

    <form runat="server">
    <!-- Insert content here -->
    </form>
    </body>
    </html>



    quote:Originally posted by meadowstrav

    Has anyone written a shopping cart written in vb.net and IP*Works CC ICharge that was integrated with PayFlow Pro or Authorize.net's payment services. I currently have a cart application that was based off of the IBuySpyStore. The only problem is that I am not sure how to integrate IP*Works CC ICharge with Verisign's payflow pro or authorize.net's payment services. Any help would be greatly appreciated.

    Thanks,

    djsilva46
    </blockquote id="quote"></font id="quote">
     
  4. How do I reference nsoftware.IPWorksCC.dll? My 'Imports' statements in my code behinds error out with '...cannot be found':

    --
    Imports nsoftware.IPWorksCC

    Public Class CheckOut
    Inherits System.Web.UI.Page
    --

    In my local development environment, I downloaded the .dll from nsoftware, put it in the bin, then set a reference to it, but the .dll is for limited use.

    Thanks!

    John D
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    Once you put the reference into your project, you should be able to compile your project. The code will not run on your machine, unless if you buy the license from nsoftware.

    Once you upload it to our server, it should run fine


    quote:Originally posted by nava

    How do I reference nsoftware.IPWorksCC.dll? My 'Imports' statements in my code behinds error out with '...cannot be found':

    --
    Imports nsoftware.IPWorksCC

    Public Class CheckOut
    Inherits System.Web.UI.Page
    --

    In my local development environment, I downloaded the .dll from nsoftware, put it in the bin, then set a reference to it, but the .dll is for limited use.

    Thanks!

    John D
    </blockquote id="quote"></font id="quote">
     
  6. Works great. Thanks, Bruce.

    nava
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page