Post by donmck » Sun Jun 12, 2016 3:16 pm

It's OK Tim, I just got onto it.

The appropriate code out of module in V2.2.0.0 of course. I'll give it a try, and see if this fixes my problem.

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by Burt65 » Sun Jun 12, 2016 5:30 pm

Excellent. That's the kind of team work you like to see when you get home...

I would like to say Thank You to Don for pointing out the missing instruction of how to setup up PayPal login setting in the PayPal App info in particularly the "scopes defaults" and to Tim for finding the bug in 2.1.0.2 that did not allow PayPal to finalise the Login.

To recap:

Info on PayPal App settings HERE

and the changes to Opencart 2.1.0.2 in:

catalog/model/module/ pp_login.php

From this original 2.1.0.2

Code: Select all

$endpoint = 'https://api.sandbox.paypal.com/v1/oauth2/token';
      } else {
         $endpoint = 'https://api.paypal.com/v1/oauth2/token';
      }

      $request  = '';
      $request .= 'client_id=' . $this->config->get('pp_login_client_id');
      $request .= '&client_secret=' . $this->config->get('pp_login_secret');
      $request .= '&grant_type=authorization_code';
      $request .= '&code=' . $code;
      $request .= '&redirect_uri=' . urlencode($this->url->link('module/pp_login/login', '', 'SSL'));
To the original 2.2.0.0

Code: Select all

$endpoint = 'https://api.sandbox.paypal.com/v1/identity/openidconnect/tokenservice';
         } else {
            $endpoint = 'https://api.paypal.com/v1/identity/openidconnect/tokenservice';
         }

         $request  = '';
         $request .= 'grant_type=authorization_code';
         $request .= '&code=' . $code;
         $request .= '&redirect_uri=' . urlencode($this->url->link('module/pp_login/login', '', true));
Thanks to Tim for finding out the discrepancy between the two versions of Opencart.

Don if there is nothing else, could you please mark your first topic as solved.

Well done guys...

Cheers

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz

Post by donmck » Mon Jun 13, 2016 4:56 am

Thanks very much Burt65,

I swapped the code and it is working fine on my friend's PP account. However he is an Australian like me, so we can't test for an International software order, and the problems we encountered.

What I really need is someone to test for an International software download order to make sure that the local "GST tax and shipping" isn't added, and that the "blank address 2 isn't created".

Of course there is no need to pay for and complete the order, just "Log in with PP" so that the customer registration is completed. When this is done, you simply cancel on the PP form, and return to the store.

Cheapest software item I have in this category is:
https://www.shop-dontronics.com/codevis ... nsion.html

Any takers?

A screen shot of the PP costs before payment, would be absolutely ideal.

BTW
If I can test this last step, then I am more than happy to mark it as solved.

Cheers Don...
Last edited by donmck on Fri Jun 17, 2016 11:37 am, edited 1 time in total.

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by Burt65 » Mon Jun 13, 2016 7:05 am

Hi Don

does your PayPal express payments normally works with international orders?

If yes, then you have no problems, as that is the module PayPal Log In will try to use, if you have it enable in both PayPal App and in your module Payments, to charge your customers tax and shipping based on your Setting/Localisation.

If the payment of choice you are using now, doesn't currently works as it should, it doesn't really have any bearings on the PayPal Log In module that we are discussing in this topic.

You don't actually need anybody to test your payments as you can see it for yourself. Whatever is listed in your last page of the checkout before you click "continue" in step 6, is what the payment will be. So if you have taxes and/or wrong shipping in there you already know that your settings are wrong. No need to proceed further...

You may want to start a new topic with the new subject regarding taxes and shipping so not to confuse the two topic.

Cheers

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz

Post by donmck » Mon Jun 13, 2016 12:16 pm

Hi Burt65

Not quite accurate, but best I try and explain it a little differently, and I hope in a short version.

Started my new cart a month ago running Merchant card payment and PayPal Express. Apart from the usual setting up teething problems with shipping and tax, it has been running fine for the month. It has taken all sorts of transactions correctly using both of these methods.

I wanted LIWPP as my old cart used this method of Logging in. I was able to get this going with the help of many on this thread including yourself.

However the first International transaction that came through added two things I didn't want, that is local Tax for an International order, and a blank address 2. This was an order from HK.

My only "software fix" to get LIWPP working was the "extension fix", mentioned earlier in this thread, and the only change was using LIWPP. As transactions went through correctly with PP Express, and corrupted with LIWPP, I knew I had to try Tim's method to prove it.

I removed the "Extension software fix", and added Tim's code from V2.2.0.0

Now I need to test it. Regarding shipping, there is no problem with this type of transaction, but if I am going to the trouble of testing, then I would like to see the full results.

So my LIWPP software still needs testing.

I logged into the cart with the HK customers profile, and it didn't add Tax the second time when I tested it, so I know my tax settings are correct. The error only occurred when the customer used LIWPP to create the new account.

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by Burt65 » Mon Jun 13, 2016 4:20 pm

Unfortunately, I'm unable to reproduce the error you are referring to. Opencart 2.1.0.2 and PayPal Log In doesn't change either the taxes or the shipping in my store. It only load what is already there in step 6 of the checkout and transfer it into the PayPal express payment.

Cheers

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz

Post by donmck » Mon Jun 13, 2016 4:30 pm

Thanks Burt65. It will only take one overseas LIWPP customer to create a profile to verify the code is correct. Hopefully this will happen in the next few days anyway. I'll let you know when it does.

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by Burt65 » Mon Jun 13, 2016 4:37 pm

donmck wrote:Thanks Burt65. It will only take one overseas LIWPP customer to create a profile to verify the code is correct. Hopefully this will happen in the next few days anyway. I'll let you know when it does.

Cheers Don...
Are you charging GST based on the Invoice address or delivery address?

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz

Post by donmck » Mon Jun 13, 2016 4:46 pm

shipping-oz.jpg

shipping-oz.jpg (78.06 KiB) Viewed 3112 times

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by Burt65 » Mon Jun 13, 2016 4:54 pm

Well, I don't understand then, why does the customer has to be from overseas??? As long as the delivery address goes overseas, you should be able to test your PayPal Payment by using your friend PayPal account here in Australia and then selecting a different address overseas...

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz

Post by donmck » Tue Jun 14, 2016 4:30 am

LIWPP by definition creates a user account from the PP customers registered information. Unless I get my friend to change his address in his PP account to an overseas one, I can't test an account from an overseas customer. I think I have already pushed our friendship a little too far with this testing now.

What we are testing is the account creation, and nothing else at this point. Why does it create a blank address 2?
Perhaps this was the problem with the code that I had used. If the new code doesn't create a blank address 2, then it may do what it is designed to do.

It may well be that the blank address 2 is what is flagging the software into thinking that it is a local order, and not an International order.

If you read back a couple of messages, you will see that I have already stated that PP Express is working fine with International orders, so there is no point in testing my friend's account with an overseas order.

We are not testing PP payment, and there is no reason to do so again. We are testing "Log in with PayPal"!

Why don't I just wait for my first O/S customer instead of hassling my friend further?

Cheers Don...
Last edited by donmck on Fri Jun 17, 2016 11:38 am, edited 1 time in total.

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by donmck » Thu Jun 16, 2016 11:40 am

add-remove-button.jpg

add-remove-button.jpg (124.95 KiB) Viewed 3031 times

If you mean, how do you enable "LIWPP" button?

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by donmck » Fri Jun 17, 2016 11:28 am

To inform any users watching this thread that I created, the problem for me is now solved, as I have had a new order from the USA that used the "LIWPP" option, and the new code didn't create a blank address 2, and didn't add local taxes.

It grabs the name and address registered with their PayPal account, and uses this to create a new profile in your OC shopping cart, as advertised. :-)

Thank you to everyone that assisted me.

As the previous poster hasn't responded to messages, and it appears to be a PP Express logo problem, I'll mark the thread as solved.

Cheers Don...

New member

Posts

Joined
Thu Feb 26, 2015 11:52 am

Post by straightlight » Fri Jun 17, 2016 7:06 pm

donmck wrote:To inform any users watching this thread that I created, the problem for me is now solved, as I have had a new order from the USA that used the "LIWPP" option, and the new code didn't create a blank address 2, and didn't add local taxes.

It grabs the name and address registered with their PayPal account, and uses this to create a new profile in your OC shopping cart, as advertised. :-)

Thank you to everyone that assisted me.

As the previous poster hasn't responded to messages, and it appears to be a PP Express logo problem, I'll mark the thread as solved.

Cheers Don...
Thanks for the update donmck. At least, now, we know what merchant should expect to see in the future. :)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Burt65 » Sun Jun 19, 2016 1:00 pm

straightlight wrote: Thanks for the update donmck. At least, now, we know what merchant should expect to see in the future. :)
dmk.JPG

dmk.JPG (9.71 KiB) Viewed 2985 times

:D

Sorry... couldn't resist...

Over 95% of all computer problems can be traced back to the interface between the keyboard and the chair...


User avatar
Active Member

Posts

Joined
Mon Nov 18, 2013 3:23 pm
Location - Oz
Who is online

Users browsing this forum: No registered users and 20 guests