receiverList cannot be null

  • Posts: 23
  • Thank you received: 1
8 years 11 months ago #199961

-- HikaShop version -- : 2.4.0
-- HikaMarket version -- : 1.6.2
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.4.31
-- Browser(s) name and version -- : Firefox 37.02
-- Error-message(debug-mod must be tuned on) -- : Invalid request parameter: receiverList cannot be null

After changing PayPal adaptive to live app, checkout started throwing the error "Invalid request parameter: receiverList cannot be null." I changed back to sandbox credentials and still got the same error.

I thought maybe I had changed something else that broke it, so restored a backup to a subdirectory and tested at every step to make sure the error wasn't there. As soon as I switched the subdirectory restored site to live, the error came back and again wouldn't go away when I switched back to sandbox.

I'm totally stumped. I don't understand why the error wasn't there in sandbox, and now won't go away even when I go back to sandbox. Can you please help?

I saw where one other person on the forum got this error when he switched to live but he didn't say how he fixed it.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 1
8 years 11 months ago #199962

I just realized I put this in the wrong category but can't move it. Shouldn't be in feature requests - sorry.

Anyway, I should have said when I switched to live I did change the vendor email addresses to live PayPal accounts, and when I switched back to sandbox I changed the vendor email addresses back to sandbox email addresses.

I restored another backup that's still in sandbox mode (and doesn't throw the error) to the /orig subdirectory, if you want to compare the credentials in the 2. This is the same backup referred to above, that I had restored to another subdirectory (and it did start throwing the error as soon as I switched to live and it wouldn't go away when switched back to sandbox).

Last edit: 8 years 11 months ago by lisakb.

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #199970

Hi,

Can you please provide a screenshot of your paypal adaptive configuration (the sandbox one) ?
It will help me to understand the source of the issue and provide an explanation which could help other users with the same kind of issue.

I saw your email though the contact form but unfortunately, we can't access to the backend ; we are automatically redirected to the front-end home page.
About the other thread, if you can provide the link, it could also help.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 1
8 years 11 months ago #199991

Sorry - I forgot we had a parameter at the end: index.php?shop

link to the other post w/ the same error message
I think his problem may have been due to having the store set as secondary receiver, but I don't have that setting.

I'm attaching a screenshot of the settings for sandbox. These settings work initially, but when I change to live and get the receiverlist null error and then switch back to sandbox w/ exact same settings I still get the same error. It's like something is getting stuck when I switch to live, so I don't know what's causing the error in either live or sandbox. Note: I've tried w/ "notify for wrong emails" set to both yes & no, w/ no effect on the error.

The other error I get occasionally is ""If the fractional amount is rounded for currency conversion, funds could be lost" but I've been getting this all along. I need to find where the number of decimals is set in the code, I guess (I have it set to 2 in the config).

Thank you very much for your help!

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200028

Hi,

I saw that your vendors have a paypal email ; but I don't know if that email is valid when you're not in a sandbox mode ; in that case the plugin might refuse them and in some circumstances, it might not be able to recreate correctly the "receiverList".

Because you do not have any fee configured ; your main vendor should not be present in the receiverList ; specially if the vendors during the creation of the order all have a paypal email.
So if these accounts (or the account if there is just one vendor) are refused by paypal (for an incorrect paypal email) ; the plugin should fix the "receiverList" ; when the main vendor is not present, the current algorithm of the plugin can't

To be sure of that, I will need more details about the test orders you're doing.
So I can try to reproduce the issue and see the content that the plugin is trying to send (thanks to the debug mode and the payment log) ; I can also check the vendor paypal email before and after trying to perform the order.

Thanks to that information ; I will be able to improve the algorithm which process the receiverList.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 1
8 years 11 months ago #200034

Hi! Before testing the live paypal I changed the vendor email addresses to their real PayPal addresses. When I first got the error I also tried it with my own paypal address (which I was sure was good) and still got the error. When I switched back to sandbox after getting the live error, I changed the email addresses back to sandbox emails.

Tomorrow morning I can send live paypal email addresses through your contact email if you would like, as well as the live paypal settings.

Since we don't have fees I made the following code change that was recommended to me previously (I also tried it with the original code after getting the error). Thank you!! I appreciate your help.

Jerome wrote: Hi,

You can see to replace in the plugin

	if(empty($this->payment_params->store_secondary) || $store_amount > 0)
		$struct['receiverList'][] = $e;
into
	if($store_amount > 0)
		$struct['receiverList'][] = $e;
It will only put the store in the list if his sum or superior than 0.
I will perform some test in order to be sure that it will not break anything for the existing configuration ; but in your case it should work.

Regards,

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200067

Hi,

In the plugin, please try to replace

if($this->payment_params->payment_mode != 'chained' || !empty($this->payment_params->store_secondary)) {
	foreach($suborders as $k => $suborder) {
		if((int)$suborder->order_vendor_id <= 1)
			continue;
By
if($this->payment_params->payment_mode != 'chained' || !empty($this->payment_params->store_secondary)) {
	foreach($suborders as $k => $suborder) {
		if((int)$suborder->order_vendor_id <= 1)
			continue;

		$paypal_email = $suborder->vendor_email;
		if(!empty($suborder->vendor_params))
			$suborder->vendor_params = unserialize($suborder->vendor_params);
		if(!empty($suborder->vendor_params->paypal_email))
			$paypal_email = $suborder->vendor_params->paypal_email;

		$paypal_email = trim($paypal_email);
		if(strpos($paypal_email, '@') === false)
			continue;
So the "store_amount" won't be decremented for sub orders which does not have a paypal email.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 1
8 years 11 months ago #200077

Sorry, but I still got the error "Invalid request parameter: receiverList cannot be null"

I'm going to use your contact form to send ftp login & other info as that might help. Thank you!

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200113

Hi,

Thanks for the accesses.
I was able to perform some tests (using the sandbox) and I realized that your vendor fees were wrong configured, the vendor total was always "$0".
So I fixed the configuration and I introduced a patch to right process the "store amount" in the paypal adaptive plugin in order to handle that special configuration.

With my latest test (in sandbox), it was good.
Let me know if you have still an issue.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 1
8 years 11 months ago #200126

I changed it to live PayPal & don't get the error any more, but now the PayPal checkout page shows it's paying my company regardless of which vendor a product is being sold by. I tried it with 1 product and multiple products, and the PayPal payment page always shows just my company's PayPal as the seller rather than each vendor. It should be each vendor being paid & my company being paid nothing.

I added a $1 test product for each of the 3 vendors that I currently have published, if you want to try it.

I'm sorry :/ I do really appreciate your help!

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200147

Hi,

The test orders you made where with product without any vendor ; so it means that your store is selling them.
Please just take a look at the order in the backend and you will see that the column "vendor" in the product listing does not have any vendor listed.

I performed two test orders in order to check the vendor total and the second with the "debug" activated (but without the sandbox).
And how you can see in my screenshot, the receiver is a gmail address, the vendor address, and not your paypal store email.

So, for what I saw, it is now working quite better then before

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 1
8 years 11 months ago #200194

Duh - I feel really stupid! Sorry about that.
Will a patch be released for the changes or do we need to make sure we make them again every time we upgrade HikaShop? If we'll need to make the changes I need to know what changes you made so we can make note of them.

Thank you so much for all of your help - and your patience.

Now I just need to figure out why PayPal is opening in a new window. The return url is to the orders list, but because PayPal is opening in a new window the site goes to a login page when it's returned to the order list. Hopefully I can find it myself & won't have to bother you!

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200212

Hi,

The patches I made in your website will be in the next HikaMarket release.
So you wouldn't have to edit the plugin after the next update.

About the new window ; I see that I set the "target" for the form in every cases when it should be set just for the "popup" mode.
I saw that you have edited the "end" view of the plugin to remove the target so you shouldn't have the problem anymore and with the patch I added, you shouldn't have the problem after the next update too.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 1
8 years 11 months ago #200216

I've got everything working now :) Thank you so much for all of your help. I'll post a review on JED - you've been awesome.

The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.055 seconds
Powered by Kunena Forum