Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 03-18-2020 01:16:59

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Disable Delivery Address Changes for PayPal Orders

is it possible to stop customers from altering the delivery address on just PayPal checkouts so their only option is to have goods delivered to a PayPal verified address with seller protection?

For example, suppress the "Deliver to a Different Address" link.

Last edited by sdn (03-18-2020 01:17:54)


Simon

Offline

 

#2 03-18-2020 08:08:30

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

Edit the file {private}/apps/ecom/ECOM/includes/coshipinfo.php.  At the bottom of the file you will see all the links being printed for shipping address changes starting with a return statement for backend displays:

Code:

// +--
// | Don't print links for BackEnd requests.
// +--

if (!(empty($isbackend))) {return 1;}

Right below that, add:

Code:

if ($cosess['gateway_select'] == 'paypalproe') {return 1;}

That should suppress the links on the checkout page when PayPal Website Payments Pro Express (express checkout) is selected.


Nick Hendler

Offline

 

#3 03-18-2020 10:21:40

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Disable Delivery Address Changes for PayPal Orders

Great, that works but the "Update Billing Information" link is still there. Is there any way to also remove that one?


Simon

Offline

 

#4 03-19-2020 08:31:29

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

sdn wrote:

Great, that works but the "Update Billing Information" link is still there. Is there any way to also remove that one?

In {private}/apps/ecom/ECOM/includes/cobillinfo.php, right below:

Code:

if (!(empty($isbackend))) {return 1;}

Add:

Code:

$cosess = $this->globals('ecom.checkout_cosess');
if ($cosess['gateway_select'] == 'paypalproe') {return 1;}

And that would suppress the billing info change links in checkout for PayPal Website Payments Pro Express Checkout orders.


Nick Hendler

Offline

 

#5 03-20-2020 05:45:23

eramusic
Member
From: Constanta
Registered: 03-20-2020
Posts: 2
Website

Re: Disable Delivery Address Changes for PayPal Orders

Thanks for the support!
I had the same problem!

Best regards!

Offline

 

#6 03-24-2020 03:45:03

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Disable Delivery Address Changes for PayPal Orders

The second piece of code did not remove the "Update Billing Information" link. It removes the "Deliver to a Different Address" link only. The problem with "Update Billing Information" link is that you can also change the delivery address when doing a guest checkout. If you are logged into an account it only shows the billing address fields.

However, it highlights a problem outlined in post #12 onwards at https://forum.kryptronic.com/viewtopic.php?id=33881
My test account populated the delivery address with a one-time address and the new code stopped me from changing it so I have removed the new code. One problem solved and a new worse one created.

Still, plenty of time to think about it now we are all in COVID-19 lockdown in the UK. Pray that it does not take hold in the US…

Can the cart be made to use the information provided by PayPal to populate the Billing and Delivery address fields for Express checkouts rather than reverting back to previous session data? Is there a reason it does not do that anyway?

Last edited by sdn (03-24-2020 09:17:08)


Simon

Offline

 

#7 03-24-2020 11:51:48

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

My test account populated the delivery address with a one-time address and the new code stopped me from changing it

Why did you want to change the address you logged with the order at PayPal?


Nick Hendler

Offline

 

#8 03-25-2020 07:07:49

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Disable Delivery Address Changes for PayPal Orders

When logged into an account and doing a PayPal Express checkout, the debug output shows that the delivery address is being pulled from "CORE_Session::sessupdate: BULK session update:" and not the SOAP address information provided by PayPal in "ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/". The delivery address was not the one last used though.

When logged out of the account, the billing and delivery address match the PayPal SOAP data.

I have also noticed that if you update the delivery address, you break out of the Express checkout process and revert to a conventional checkout with PayPal standard and card payment radio buttons and a "Continue" button rather than the "Process Payment" button to complete the Express checkout which is going to confuse people.

Last edited by sdn (03-25-2020 07:08:49)


Simon

Offline

 

#9 03-25-2020 08:59:11

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

I'm looking into this.  This may be a *feature* from the session changes made during update 9.0.2.  The behavior you describe is not correct.  I'll give it a good going over.


Nick Hendler

Offline

 

#10 04-03-2020 07:40:07

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Disable Delivery Address Changes for PayPal Orders

Could the code be amended so that it populates both the billing and delivery address fields with the same information? I assume this code does just the billing address fields?

Code:

$addbook = $this->globals('core_session.addbook'); if ((empty($addbook)) || (!(is_array($addbook)))) {$addbook = array();}
$hash           = md5(serialize($addy));
$addbook[$hash] = $addy;
$sessiondata['addbook']         = $addbook;
$sessiondata['addbook_billing'] = $hash;

Last edited by sdn (04-03-2020 07:41:22)


Simon

Offline

 

#11 04-06-2020 07:57:18

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

That code is adding an address book entry for the billing address.  Where did you grab that from?  The PayPal Express module?


Nick Hendler

Offline

 

#12 04-06-2020 09:00:30

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Disable Delivery Address Changes for PayPal Orders

Yes, paypalproe.php


Simon

Offline

 

#13 04-07-2020 09:46:42

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

That's what that code is doing - PayPal only sends over a shipping address so that's copied over to the billing address and an address book entry is made with that address.


Nick Hendler

Offline

 

#14 04-09-2020 15:10:37

polarize
Member
Registered: 11-15-2004
Posts: 309

Re: Disable Delivery Address Changes for PayPal Orders

We are having this issue as well


Using Kryptronic K9! smile
Previous Versions:
ClickCartPro 8
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#15 04-10-2020 08:28:41

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

We'll be disabling the ability to change the delivery or billing info from within checkout when a PayPal Express checkout token is active.  That will be in the next update (9.1.0).


Nick Hendler

Offline

 

#16 04-12-2020 05:47:33

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Disable Delivery Address Changes for PayPal Orders

OK, good. Is there a release date for this update.

On a similar issue, we see the occasional card payment failures where SagePay reports error "4002 : An active transaction with this VendorTxCode has been found but the Amount is different.".

We think this happens when a customer backs out of SagePay screen using the browser back button rather than the onscreen "Cancel" link.

Does K9 recognise this has happened and then generates a new VendorTxCode?


Simon

Offline

 

#17 04-13-2020 13:47:48

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

That sage issue is a known issue and we're attempting to provide a resolution in the 9.1.0 update for it.  It should be out at the end of April.


Nick Hendler

Offline

 

#18 04-14-2020 09:30:37

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Disable Delivery Address Changes for PayPal Orders

OK, good again :-)

The SagePay issue looks to have been caused by the following events:

Customer enters SagePay Form page.
Customers backs out of the form and back to our site.
Customer changes the delivery method and the order value changes.
Customer goes back into SagePay but gets an error because K9 reuses the original VendorTX code but the order value is different.

Is that also your take on the what needs to be addressed?


Simon

Offline

 

#19 04-15-2020 10:31:28

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

Yes.  Basically K9 doesn't regenerate an order number unless the processor issues a decline code.  In this case Sage is logging the txid when the customer reaches their site and marks it as non-reusable, the customer is using the back button to return to the site, may or may not make changes, and then K9 posts the same order number back to Sage for processing, which is refused due to reuse (even though no decline or other processing happened).  We're working on a way to regenerate the order number when using Sage if the back button is used to back up into checkout.


Nick Hendler

Offline

 

#20 04-15-2020 13:06:53

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Disable Delivery Address Changes for PayPal Orders

It appears to be changing the Amount requested that upsets SagePay rather than backing in and out with the Amount unchanged. I have done a bit of testing and found that to be the case so maybe that is an easier solution for you to work on.

I tried testing on three different browsers on the same PC with different baskets (logging into the same user account) and got an error on two as the amounts were different to the first. Once I made the other baskets the same as the first, I could back in and out of SagePay without any problem.

Last edited by sdn (04-16-2020 04:01:16)


Simon

Offline

 

#21 04-16-2020 08:40:59

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

Thanks for the info.  We're going to need to regenerate the order if we see a back event from SagePay in order to compensate.  This info does give us an alternative which we can look into if back event logic proves problematic to implement.


Nick Hendler

Offline

 

#22 06-09-2021 07:10:01

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1716

Re: Disable Delivery Address Changes for PayPal Orders

NIck

Have you got a temporary fix for the sagepay order number issue? so a new order number is generated if user backs out of payment page and changes order value?

Thanks
Rob


Rob

Offline

 

#23 06-09-2021 08:07:24

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Disable Delivery Address Changes for PayPal Orders

No, we do not have a temporary fix, however a permanent fix is going to be part of 9.1.0, which will release soon.


Nick Hendler

Offline

 

#24 06-24-2021 02:55:30

Murphys001
Member
Registered: 09-06-2014
Posts: 23

Re: Disable Delivery Address Changes for PayPal Orders

Hello,

Are you still planing a solution in the 9.1.0 update for SagePay and PayPal express?

Thanks, Richard

Offline

 

#25 06-24-2021 07:24:33

frank-track13
Member
Registered: 09-04-2018
Posts: 20

Re: Disable Delivery Address Changes for PayPal Orders

Richard,

We are still planning a solution to be included in the 9.1.0 update, which should be released by the end of this month.


Frank

Offline

 

Board footer