Thanks for a great module ...

It works fine when I place an order and go to the Quickpay administration to capture the money (secure.quickpay.dk).

However, when I press the Capture button in the Ubercart order payments (i.e. /admin/store/orders/125/payments) I get this error:

- Server returned non-success code or empty result
- warning: preg_match() expects parameter 2 to be string, array given in /usr/dana/data/beta.byg-erfa.dk/docs/includes/bootstrap.inc on line 777.
- Capture failed, reason given:

Any suggestions to how this can be fixed?

Comments

xen’s picture

Assigned: Unassigned » xen
Priority: Normal » Critical

I'll look into it.

xen’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

I cannot reproduce this. Trying to read the errors:

- Server returned non-success code or empty result

QuickPay either didn't return a response, or used a HTTP response code other than 200, which is out of spec. Either there were something in the request that it really didn't like (as in: made it crash, as usually it returns an error message), or the request got seriously munged.

- warning: preg_match() expects parameter 2 to be string, array given in /usr/dana/data/beta.byg-erfa.dk/docs/includes/bootstrap.inc on line 777.

Line 777 is in drupal_validate_utf8: http://cvs.drupal.org/viewvc.py/drupal/drupal/includes/bootstrap.inc?ann...

which is called from check_plain. Which is most likely caused by the t() call that outputs:

- Capture failed, reason given:

As the missing return code causing it to try and check_plain on an array.

Indicates that some error handling could be improved, but nothing helps identifying the real problem, which is that the request to QuickPay fails horribly for some unknown reason.

bjaxelsen’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I'm really sorry ... the reason for this error is that my webserver did not accept the php command file_get_contents for SSL connections. This is fixed now and the capture works smoothly.