Originally Posted by
Mike D
1. I changed some setting somewhere a couple nights ago and now when I try to test the module in test mode I don't get any fields at checkout. I can insert billing address, but I don't get the CC# field, expiry, CVV code, any of that. Not in testing mode, anyway. In production mode or with other payment modules the fields still show up.
It's the code in the selection() function that generates those fields to be displayed by your template.
Originally Posted by
Mike D
2. Is anybody aware of what part of the code actually checks the response obtained from the processor?
In before_process() these lines:
Code:
$authorize = curl_exec($ch);
$commError = curl_error($ch);
The $authorize variable will contain the entire response, which appears to be in XML format with this gateway.
The $commError will contain any error messages related to making communications with the gateway, but not errors issued *by* the gateway.
Then just below that section is:
Code:
// use XML Parser on $authorize
$xml_parser = xml_parser_create();
xml_parser_set_option($xml_parser,XML_OPTION_CASE_FOLDING,0);
xml_parser_set_option($xml_parser,XML_OPTION_SKIP_WHITE,1);
xml_parse_into_struct($xml_parser, $authorize, $vals, $index);
xml_parser_free($xml_parser);
... which parses the XML into a more usable format, and stuffs it into the $vals object.
So, after this section you could add:
Code:
die(var_dump($vals));
to have it completely halt and dump the response to the screen. (Not ideal for a live site where real orders are happening, but okay for debugging separately.)
Bookmarks