meadowstrav
09-08-2003, 04:53 AM
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.Icha rgeGateways), "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
[b]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.Icha rgeGateways), "1")
Icharge1.CardExpMonth = 12
Icharge1.CardExpYear = 06
Icharge1.CardNumber = "4111111111111111"
Icharge1.InvoiceNumber = 9876
Icharge1.MerchantLogin =
Icharge1.TransactionAmount = 1
End Sub
</script>
<html>
<head>
</head>
[b]
<form runat="server">
<!-- Insert content here -->
</form>
</body>
</html>
[b]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">
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.Icha rgeGateways), "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
[b]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.Icha rgeGateways), "1")
Icharge1.CardExpMonth = 12
Icharge1.CardExpYear = 06
Icharge1.CardNumber = "4111111111111111"
Icharge1.InvoiceNumber = 9876
Icharge1.MerchantLogin =
Icharge1.TransactionAmount = 1
End Sub
</script>
<html>
<head>
</head>
[b]
<form runat="server">
<!-- Insert content here -->
</form>
</body>
</html>
[b]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">