

Issue ID 6692 - Validate credit cards prior to order completion
This update is optional unless you have previously installed the patch made available for RC3. By making this change, you are changing the behavior of the checkout process with credit card payments. If a credit card fails to authorize during an order, the customer is directed to another page where they can try to re-enter the credit card information or try a new payment method.
If you do not want to make this change, the default behavior is to accept all orders regardless of the outcome of the credit card transaction.
This change has not been fully tested. If you find a bug, please report it.
1.
Login to the AbleCommerce merchant menu as the admin, or a user with website edit permissions.
2.
Go to Website > Content and Layout
3.
Find and edit the “My Order Page” content scriptlet.
4.
The content field should have this tag:
[[ConLib:MyOrderPage]]
5.
You need to include the "HandleFailedPayments" attribute to turn on failed payment handling, so change it to look like this instead:
[[ConLib:MyOrderPage HandleFailedPayments=”true”]]
6.
After updating the scriptlet content, save the changes.
7.
Find and edit the "Receipt Page" content scriptlet.
8.
The content field should have this tag:
[[ConLib:ReceiptPage]]
9.
Again, you need to include the "HandleFailedPayments" attribute to turn on failed payment handling, so change it to look like this instead:
[[ConLib:ReceiptPage HandleFailedPayments=”true”]]
10.
After updating the scriptlet content, save the changes.
Code: Select all
....
AuthorizeRequest.BaseAddress = "https://secure.authorize.net/gateway/transact.dll"
ReturnBytes = AuthorizeRequest.UploadValues(AuthorizeRequest.BaseAddress, "POST", Information)
ReturnValues = System.Text.Encoding.ASCII.GetString(ReturnBytes).Split(",".ToCharArray())
If ReturnValues(0).Trim(CChar("|")) = "1" Then [color=#BF0000]
'Card Ok: write card to database.
Response.Redirect("https://...../Receipt.aspx", True)
Else
test.Text = ReturnValues(3).Trim(CChar("|")) & " (" & ReturnValues(2).Trim(CChar("|")) & ")"
If ReturnValues(2).Trim(CChar("|")) = "65" Then
test.Text = test.Text & " " & "Your Verification Number may have been incorrect.
Please wait 2 minutes then try your Verification Number again."
Else
If ReturnValues(2).Trim(CChar("|")) = "11" Then
test.Text = test.Text & " " & "A transaction with identical amount and credit card
information was submitted within the previous two minutes. Please wait 2 minutes
and try your Verification Number again."
End If
End If
Return