Hi,
I'm a developer working with a client who is adding Commerce using iATS to their existing Drupal 7 web site.
I'm using the "iATS Payments: Credit Card Payments" method.
I'm getting a "REJECT:40" error.
The credit card I'm using I tested while logged in to iATS on their web site and using the virtual terminal. The credit card processed without problem. So it isn't in fact a credit card problem.
Any ideas about where in the set-up I've got a problem?
Below is an export of the rule (of course I've changed the values for the client ID, the password, and the Post key)
{ "commerce_payment_iats_credit_card" : {
"LABEL" : "iATS Payments: Credit card payment",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"TAGS" : [ "Commerce Payment" ],
"REQUIRES" : [ "commerce_payment" ],
"ON" : { "commerce_payment_methods" : [] },
"DO" : [
{ "commerce_payment_enable_iats_credit_card" : {
"commerce_order" : [ "commerce-order" ],
"payment_method" : { "value" : {
"method_id" : "iats_credit_card",
"settings" : {
"agent_code" : "3ABC80",
"agent_password" : "blahagentpassword",
"direct_post" : {
"enable_direct_post" : 1,
"process_key" : "blahbalhprocesskey"
},
"server" : "NA",
"log" : { "request" : "request", "response" : "response" },
"detailed_failure_message" : 1,
"invoice_prefix" : "I-",
"credit_card" : { "card_types" : {
"visa" : "visa",
"mastercard" : "mastercard",
"amex" : "amex",
"discover" : 0
}
}
}
}
}
}
}
]
}
}
(And FYI, I didn't use the installation profile. The site is an existing Drupal 7 site, so I did a manual Commerce install. I thought I'd try to get it to work on a fresh install with your install profile before coming here and posting a help request. But alas, as per the other issue, I ran into a segfault (after solving some of the other issues).
Thanks much for your help.
Shai
Comment | File | Size | Author |
---|---|---|---|
#17 | bootstrap-dpm-2665540.patch | 767 bytes | Greg Boggs |
#6 | Screenshot from 2016-02-12 13-33-47.png | 45.57 KB | Shai |
#4 | failed-transaction.png | 15.08 KB | Shai |
Comments
Comment #2
Greg BoggsThe iATS test account returns accept and reject codes based on the Dollar amount you're sending for payment. A payment for $1 should go through. See:
http://home.iatspayments.com/developers/encrypted-swipe/testing
Comment #3
Shai CreditAttribution: Shai commentedGreg, thanks.
I can't get a transaction to go through. And let me repeat that the specific credit card processed without any problem when using the iats virtual terminal.
Here is info provided at iATS (transaction ID and other private info has been doctored):
Here is information provided by Drupal:
I need help figuring out the next step in troubleshooting. I tried with "Direct Post" turned both on and off.
Thanks in advance.
Comment #4
Shai CreditAttribution: Shai commentedHere is information provided by commerce:
Comment #5
Greg BoggsHi Shai,
Can you follow up with iATS support on this issue? They can see the cause of the rejection on their side.
~Greg
Comment #6
Shai CreditAttribution: Shai commentedHi Greg,
I called iATS. They say that the expiration date is not coming through. See screen shot from their terminal report.
On the Drupal Commerce site, the fields for month and year are displaying. The message below comes from Drupal Watchdog. There I see that the expiry month is missing from that message.
Personal info the message below has been changed.
MESSAGE iATS API response from iATS Credit card payment: <pre>Array ( [IATS_AccountNumber] => 5822 [IATS_MOP] => MC [IATS_PaymentType] => CreditCard [IATS_Result] => REJECT: 40 [IATS_TransID] => B45A5000 [IATS_Address] => 1003 Blue St. [IATS_City] => Pittsburgh [IATS_Comment] => DrupalModule|7|iats_credit_card|commerce_payment_iats_credit_card|PA50E9CE [IATS_Country] => US [IATS_EMail] => [IATS_Title] => [IATS_FirstName] => John [IATS_LastName] => Smith [IATS_Phone] => [IATS_Fax] => [IATS_Phone2] => [IATS_State] => PA [IATS_ZipCode] => 13456 [IATS_Amount] => 1.00 [IATS_Payment_AgencyCodeHash] => F26C383384902C6FAAE3blahblahblahblahbalh [IATS_ExpiryMonth] => [IATS_ExpiryYear] => 20 [IATS_Payment_SubCode] => 80 [IATS_Invoice] => I-7 [IATS_Item1] => [IATS_Item2] => [IATS_Item3] => [IATS_Item4] => [IATS_Item5] => [IATS_Item6] => )
Thanks for sticking with me on this one.
Shai
Comment #7
Greg BoggsThis isn't something we've seen before.
Can you confirm whether or not you're using DPM? DPM is a completely different payment process because DPM submits the form directly to iATS while a regular CC payment form submits the form to Drupal. Also, have you done any form alters or overrides of your payment form?
If you aren't doing DPM, can you try using it again, and make sure your form is refreshed such that the form submits the post action directly to iATS rather than to Drupal. iATS should see completely different behavior between DPM and regular payments.
Comment #8
Shai CreditAttribution: Shai commentedHi Greg,
Yes. I'm using DPM.
But I've made progress. I just tried switching the theme to Bartik and it processed my test donation with no problem. Hurray.
The theme we are using is a Bootstrap-based third party theme called Creatrix.
Have you previously run into any problems with Bootstrap based themes?
Any suggestions on next steps to troubleshoot the theme to get it working with commerce_iats would be most helpful.
Shai
Comment #9
Greg BoggsI'll give a test with Creatrix a try. Do you have any modifications in template.php?
Comment #10
Greg BoggsHrm, given that Creatrix makes it difficult to obtain their software, it's unlikely I can help you trouble-shoot the theme.
http://themeforest.net/item/creatrix-multipurpose-creative-online-shop/6...
But, the most likely place to look for strange code is template.php. Specifically, you're looking for any form_alter or preprocess that would unset this variable: $default_form['credit_card']['exp_month’];
~Greg
Comment #11
Shai CreditAttribution: Shai commentedHi Greg,
Thanks so much. I looked in template.php for both the Creatrix module and the SuperHero module (Creatrix is a sub-theme of Superhero) and I didn't see any form_alters or anything else that seemed suspicious.
Via your Drupal.org contact I've sent you Dropbox links to access a copy of what's actually installed.
Thanks much,
Shai
Comment #12
Shai CreditAttribution: Shai commentedGreg,
Since Creatrix is based on Bootstrap, but a lot more complicated than Bootstrap, etc... I decided to install plain Bootstrip using Drupal's Bootstrap module and test a transaction with Bootstrap installed as the theme. Drupal's Bootstrap module by default uses a CDN version of Bootstrap. So this is recent (3.3.5) though vanilla version of Bootstrap. I didn't change any of the defaults that came set with Drupal's bootstrap module for Drupal 7.
The transaction did not go through. The iats journal is showing a missing expiration date, just as it did with Creatrix. The logged watchdog message is also the same as when using Creatrix that I pasted in my previous comment: the expiration month is missing.
So I think this is progress to know the problem is likely how commerce_iats plays with Bootstrap and not specifically Creatrix.
Shai
Comment #13
Greg BoggsThanks Shai,
That makes testing much easier.
Comment #14
Shai CreditAttribution: Shai commentedHi Greg,
Do you think you'll be able to look at it today?
Thanks,
Shai
Comment #15
Greg BoggsHi Shai,
Thanks for your patience on this issue. Your bug is important to iATS and to us, and I'm working on resolving it. I'll have a better update for you shortly.
~Greg
Comment #16
Greg BoggsHi Shai,
This patch will resolve the issue. You can patch the module today to fix the issue, or wait until Drupal.org issues the next release of the dev version of commerce_iats for download.
The issue was that bootstrap completely rewrites the checkout form for Drupal Commerce. The DPM form is a custom built payment form that submits directly to iATS and the markup has to be exactly right for it to work. Fortunately, the fix is super easy.
~Greg
Comment #17
Greg BoggsAttaching correctly this time.
Comment #19
Greg BoggsComment #20
Shai CreditAttribution: Shai commented@Greg,
I've tested and the fix works on our installation.
Thanks much,
Shai