Hi Greg
Fantastic work on this module, it seems to be exactly what we need to integrate into the MyGate Enterprise service.
I've put in all the Merchant ID's and so forth that Mygate has given me, and set it up on their website console correctly, but when i submit my trasnaction from the ubercart shopping cart's checkout window, it throws up a page of RAW XML - there is an error as you will see, but still - am i doing something wrong that this comes up instead of it being redirected back to the site correctly with either a success or fail message?
the result page i get looks like this:
Data:Array
(
[txn_type] => auth_capture
)
Order:stdClass Object
(
[order_id] => 21
[uid] => 672
[order_status] => in_checkout
[order_total] => 250
[product_count] => 1
[primary_email] => ash@ops.tc
[delivery_first_name] =>
[delivery_last_name] =>
[delivery_phone] =>
[delivery_company] =>
[delivery_street1] =>
[delivery_street2] =>
[delivery_city] =>
[delivery_zone] => 0
[delivery_postal_code] =>
[delivery_country] => 710
[billing_first_name] => Ash
[billing_last_name] => Glover
[billing_phone] =>
[billing_company] =>
[billing_street1] => Box
[billing_street2] =>
[billing_city] =>
[billing_zone] => 81
[billing_postal_code] => 1715
[billing_country] => 710
[payment_method] => credit
[data] => Array
(
[cc_data] => 6d%6&Wde>PKmIr=%$VxZ_#aW/U:^ KwTXhg6=HSHhOF^$;pm9)uKdKYIUSi`Yi(`U]#zCCafWt
)
[created] => 1323163496
[modified] => 1323163496
[host] => 196.210.183.201
[currency] => ZAR
[products] => Array
(
[0] => stdClass Object
(
[order_product_id] => 30
[order_id] => 21
[nid] => 2394
[title] => Conference 2012 Tickets
[manufacturer] =>
[model] => BFAconf-2012
[qty] => 1
[cost] => 0.00000
[price] => 250.00000
[weight] => 0
[data] => Array
(
[attributes] => Array
(
)
[uc_event_registration] => Array
(
[sid] => 29
)
[module] => uc_product
)
[order_uid] => 672
)
)
[payment_details] => Array
(
[cc_type] => Visa
[cc_owner] => joe soap
[cc_number] => 4111111111111111
[cc_start_month] =>
[cc_start_year] =>
[cc_exp_month] => 5
[cc_exp_year] => 2012
[cc_issue] =>
[cc_cvv] => 123
[cc_bank] =>
)
[line_items] => Array
(
[0] => Array
(
[line_item_id] => subtotal
[type] => subtotal
[title] => Subtotal
[amount] => 250
[weight] => 0
[data] => Array
(
)
)
)
)
Results:Array
(
[0] => Result||-1
[1] => TransactionIndex||14cc02b1-34dd-40d6-ab9c-615c79a6382f
[2] => Error||1019||Service.ThreeDValidate||TransactionIndex required||This transaction requires a TransactionIndex. Please specify a correct transaction index. If this problem persists, please contact MyGate at support@mygate.co.za
[3] => AcquirerDateTime||2011/12/06 11:29:13 AM
)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | payment settings | 160.29 KB | Gemma Morton |
| #3 | payment methods | 192.21 KB | Gemma Morton |
| #3 | mygate enterprise settings | 113.18 KB | Gemma Morton |
| #3 | checkout | 166.34 KB | Gemma Morton |
| #3 | review | 59.72 KB | Gemma Morton |
Comments
Comment #1
Gemma Morton commentedYour error relates to the transaction index.
I dont know if you know code, but you should do the following:
- Find the function (it is around line: 89):
function uc_mygate_charge($order_id, $amount, $data) {Where the following code exists, just do the following above $parameters:
$transid = isset($_SESSION['3dsecure']['MyGate_TransactionId']) ? $_SESSION['3dsecure']['MyGate_TransactionId'] : '';Then, into the Parameters array, underneath the Application ID, add the variable:
Let me know if this solves your problem.
Comment #2
onepartscissors commentedOK, i have tried that, but it doesn't seem to be working... the function is named slightly differently in the module from the site here, this is how the function reads now with these additions you requested:
I'm mystified - it somehow feels like the transaction index isn't being generated properly, but the weird thing for me is that the result array from my original error message actually had a transaction index listed there - not sure if that relates to the result posted back, or if this is the transaction index they're wanting?
the module with your new lines for transaction index looks like this:
Comment #3
Gemma Morton commentedHi OnePartScissors ;)
Ok. The change I suggested above is not necessary. I thought the API had changed, and that this was needed, but I have just created a clean install, without anything other than ubercart and uc_mygate (downloaded from drupal.org with no modifications) module senabled.
Please see the following screenshots to understand my setup. Let's see what the differences are. I also advise that you go back to the Dev version from drupal.org (essentially, abandon the changes made above).
This is my Debug:
Comment #4
onepartscissors commentedThanks for all your investigations on this!
I looked at their standard php example they sent me, and these are the only clues i could find - differences between their example and the drupal module. I tried making these changes but they had no success, though - maybe you can see something in these differences? (i'll post this into the issue queue too)
1. SoapClient:
their example: $client = new SoapClient("https://www.mygate.co.za/enterprise/4x0x0/ePayService.cfc?wsdl");
our module: $client = new SoapClient("https://www.mygate.co.za/enterprise/4x0x0/ePayWebService.cfc?wsdl");
2. Action variable:
theirs has an action variable in it, see here:
and the module does't:
Whether there is anything in those differences, i can't tell - when i make the module look like this it doesn't work.
will try and follow up with mygate some more - their support guys aren't big on answering emails it seems!
Comment #5
onepartscissors commentedOK, so to close this issue up , i think, we can say that this particular module works fine as intended, but it doesn't support 3D Secure, so perhaps we need to just post a note about that on the front page?
If you need 3D Secure, and sometimes MyGate refuses to let you bypass it, then you need a different module altogether.
Thanks for all your help on this Greg - truly!
life. saver.