WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: kerryww on December 27, 2011, 01:26:40 PM

Title: MOVED: Bakery error message - processor.php on line 65
Post by: kerryww on December 27, 2011, 01:26:40 PM
Hi Folks,

When I submit an order to be processed in Bakery with PayPal I get the following error message.

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/username/mysite.com/modules/bakery/payment_methods/paypal/processor.php on line 65

But the order still goes through, the error shows up for just a few annoying seconds during the PayPal process.

But any suggestions on how to clear the error?

TIA

Kerry
Title: Re: MOVED: Bakery error message - processor.php on line 65
Post by: kerryww on December 28, 2011, 08:09:26 AM
Hi Folks,

Stop searching - I found the problem!

After some head scratching and hair loss I worked out the problem. I went to modules/bakery/languages/countries and added an AU for Australia in the EN.php file.

I then went to /modules/bakery/languages/states and created my own AU.php file for Australia.

It now works.

Kerry



Title: Re: MOVED: Bakery error message - processor.php on line 65
Post by: freeSbee on January 03, 2012, 07:16:59 PM
Hi Kerry

Might be helpful to others if you post your Australien states file AU.php.
If you do not mind I will add it to the bakery/languages/states directory of the next Bakery version.

Regards Christoph
Title: Re: MOVED: Bakery error message - processor.php on line 65
Post by: 12345 on May 23, 2012, 04:24:20 PM
Here is State file for Italy with names in German: IT.php

Copy it into "/modules/bakery/languages/states/"

Bye, Kurry

[gelöscht durch Administrator]
Title: Re: MOVED: Bakery error message - processor.php on line 65
Post by: dazz on November 03, 2012, 11:10:29 AM
Australian States file for those who want it

fell free to include in future releases if you wish Christoph
Title: Re: MOVED: Bakery error message - processor.php on line 65
Post by: freeSbee on November 03, 2012, 12:29:51 PM
Hi dazz

I will add it. Thanks a lot for sharing!

Regards Christoph
Title: Re: MOVED: Bakery error message - processor.php on line 65
Post by: ima on January 09, 2013, 10:43:13 AM
I am stuck with the same problem and having read the forum still cannot understand what needs correcting, please advise anyone who may help me -

I am getting on 3rd page of Checkout with Paypal the following error message at the top:

Warning: array_keys() expects parameter 1 to be array, null given in /modules/bakery/payment_methods/paypal/processor.php on line 65

then when I still click to BUY accepting the T&C, I am getting re-directed to paypal page where my paypal address is all being separated by the words in brackets like this:

email(at)domain(dot)com

and the following message:

"We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com."

My email address is correct and is used otherwise daily to accept and process payments.

I have followed all the Bakery instructions on http://www.bakery-shop.ch/#paypal and set everything up as required.

What can I do now?
Title: Re: MOVED: Bakery error message - processor.php on line 65
Post by: Ruud on January 09, 2013, 10:59:36 AM
The simple solution is to go to the /admin > admintools > frontend output filter page and disable the email filtering options.
This function is responsible for rewriting email addresses in the WB output.
Title: Re: MOVED: Bakery error message - processor.php on line 65
Post by: ima on January 09, 2013, 11:14:07 AM
Thank you, corrected the (at) and (dot) problem.

Still have the same problem with the paypal processor error on line 65 and a new one: when I get to Paypal now it only shows the total amount payable - with no listings of the products ordered - I'll never work out that way what my customers want to buy. Any way to correct that?
Title: Re: MOVED: Bakery error message - processor.php on line 65
Post by: marmot on January 09, 2013, 09:13:41 PM
Hi,

Still have the same problem with the paypal processor error on line 65
I guess you customers country is none of the ones listed in language/states/ folder. Guess you have to make one for the customers country.
Quote
and a new one: when I get to Paypal now it only shows the total amount payable - with no listings of the products ordered - I'll never work out that way what my customers want to buy. Any way to correct that?
you can see the complete order in bakery, isn't that enough? I guess it is correct, the way the modules author wanted it to be and I'm afraid it is not that easy to make it work the way you want it.
Some time ago I made a cange which litsts the items instead of the standard aggregated items text, but never really tested it  :-D. If you want to try:
- in paypal/preprocessor.php find line ~83:
Code: [Select]
// Make array with data sent to payment gateway-right before insert:
Code: [Select]
$query_order = $database->query("SELECT o.quantity, i.title FROM ".TABLE_PREFIX."mod_bakery_order AS o, ".TABLE_PREFIX."mod_bakery_items AS i WHERE order_id = '{$_SESSION['bakery']['order_id']}' AND o.item_id = i.item_id");
$allItems = "";
while ($orderPart = $query_order->fetchRow()) {
if ($allItems !== "") $allItems .= "; ";
$allItems .= $orderPart["quantity"].'x '.$orderPart["title"];
}

-5 lines below cange
Code: [Select]
'item_name'     => $MOD_BAKERY[$payment_method]['TXT_AGGREGATED_ITEMS'],to
Code: [Select]
'item_name'     => $allItems,
once again, this does not list each item itself but a summary list with items name and ordered amount.

regards
Title: Re: MOVED: Bakery error message - processor.php on line 65
Post by: ima on January 10, 2013, 12:04:55 AM
It works! Thank you!