eileenmcnaughton / nz.co.fuzion.omngateway

OMNgateway payment processor extension for CiviCRM
1 stars 0 forks source link

$processorResponse->responseText not returned #2

Open JoeMurray opened 11 years ago

JoeMurray commented 11 years ago

After having trouble with debugging under WordPress, I've installed the OMN Gateway extension on a vanilla Drupal 4.2.9 installation on my local machine. Using the swim strong credentials I get the following error when checking out on a live Contribution page:

Notice: Undefined property: stdClass::$responseText in nz_co_fuzion_omngateway->doDirectPayment() (line 225 of/Users/josephmurray/GoogleDrive/Sites/ca42/sites/default/files/civicrm/custom_ext/nz.co.fuzion.omngateway/Omngateway.php). Notice: Undefined variable: contribution in CRM_Contribute_BAO_Contribution_Utils::processConfirm() (line 308 of/Users/josephmurray/GoogleDrive/Sites/ca42/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution/Utils.php).

A debug_var just after line 214 json_decode shows: [info] $nz_co_fuzion_omngateway->doDirectPayment $processorResponse = stdClass Object ( [responseCode] => 0 [authCode] => 009037 [fdmsResponse] => 00 [transactionNo] => 36523 [merchantEmail] => ltgreen1@yahoo.com [uuid] => 5171a20bc91105.29674692 )

This causes a notice error where $processorResponse->responseText is referred to in both the return self::errorExit(9010 line, and in if ($processorResponse->responseText == 'Approval'), with the latter causing the $params not to be returned, which causes the issue with no contribution being available to be stored.

I'm not sure which of the several Authorize.net API's is being emulated by this implementation, so I'm not sure if the issue is with the OMN Gateway not providing the responseText or the extension expecting it rather than checking some other value to confirm a success. Please feel free to upgrade the code on the swim strong server. FWIW, the server and/or WordPress seem to suppress error reporting and die silently / gracefully.

eileenmcnaughton commented 11 years ago

Joe,

I've looked & this was part of the OMNGateway Spec earlier but I believe it may have changed. Do you want to try this patch https://github.com/eileenmcnaughton/nz.co.fuzion.omngateway/commit/08e44db7db8395b235145746a54d8c5614d9760d

I suspect there may be a future update as I am checking if there is a second field I can check in place of responseText

JoeMurray commented 11 years ago

Looks good.

Joe Murray, PhD President, JMA Consulting joe.murray@jmaconsulting.biz skype JosephPMurray twitter JoeMurray 416.466.1281

On Fri, Apr 19, 2013 at 6:11 PM, Eileen McNaughton <notifications@github.com

wrote:

Joe,

I've looked & this was part of the OMNGateway Spec earlier but I believe it may have changed. Do you want to try this patch 08e44dbhttps://github.com/eileenmcnaughton/nz.co.fuzion.omngateway/commit/08e44db7db8395b235145746a54d8c5614d9760d

I suspect there may be a future update as I am checking if there is a second field I can check in place of responseText

— Reply to this email directly or view it on GitHubhttps://github.com/eileenmcnaughton/nz.co.fuzion.omngateway/issues/2#issuecomment-16692557 .