I've updated to the latest ecommerce version.

When a product is purchased and the customer has entered their paypal details, the Paypal payment is transferred, but when the Paypal redirects back to the drupal site the following error message is displayed:

"warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /var/www/docs/drupal-6.19/includes/database.mysqli.inc on line 326."

And in addition, the transaction workflow is not progressed/completed. So in my case, the node access product that enabled content access is not updated.

Any idea what might cause this?

CommentFileSizeAuthor
#2 1015040.patch626 bytesgordon

Comments

Bimble’s picture

I noticed also that updating quantity causes similar errors.

I tried to do some php backtrace stuff from the function, but have made no headway on locating the problem.

So for the time being I've gone back to the previous version.

gordon’s picture

Version: 6.x-4.1 » 6.x-4.x-dev
Assigned: Unassigned » gordon
Status: Active » Needs review
StatusFileSize
new626 bytes

I have tracked down the issue, and it seems that the problem was the schema was wrong and the serialization flag was missing.

Honest it was there last time I looked.

So because the ec_receipt.allocation field was not being serialized when Paypal was returning the ec_paypal module didn't have any allocation details to allocate the money that was just paid to the transaction.

Attached is the patch and I will be releasing a new version today.

gordon’s picture

Upon further investigation I have found that this was broken on this commit http://drupal.org/cvs?commit=440832

gordon’s picture

Status: Needs review » Fixed

This has been committed to 6.x-4.x-dev and HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.