Closed (fixed)
Project:
Ubercart Opayo (formerly Sage Pay)
Version:
7.x-3.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2016 at 14:06 UTC
Updated:
30 Dec 2016 at 13:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Collins405 commentedMarking this as Major, as 3 out of 10 customers were not able to complete the transaction, and only one of those phoned up to order over the phone, so this issue is losing my client money.
Status: INVALID
StatusDetail: 3067 : The ClientIPAddress is too long.
The issue seems to be on line 444 of uc_sagepay.module in the transaction array.
'ClientIPAddress' => ip_address(),Commenting this out seems to be working.
Comment #3
Collins405 commentedWith the above in mind, and not wanting to just remove ClientIPAddress incase someone wants it, are we better to just exclude IPv6 addresses seeing as SagePay do not support them yet anyway?
I spoke to a nice lady at SagePay today who confirmed this for us.
So, something like this would work...
Added to line 448 after the $transaction array is put together.
Comment #4
hanoiinice catch, what about the following patch, simply instead of unsetting, I am setting if it's a valid ipv4 ip. Can you try and let me know?
I'll commit and release a new version.
Comment #5
Collins405 commentedNice! That looks like its all good.
Tricky one to test, as you need to have a IPv6 client IP, and not all customers have that!
Comment #6
hanoiiAt least test if it works properly with an ipv4 address :)?
Comment #7
Collins405 commentedYes that works perfectly, tested on a dev environment with test transactions, and after that i pushed it to my client production site and tested it there as well.
Status: OK
StatusDetail: 0000 : The Authorisation was Successful.
Comment #8
Collins405 commentedComment #9
hanoiihave you checked if the ip was actually properly recorded on sagepay, the ipv4 IP?
Comment #11
hanoiiComment #12
hanoiiComment #13
Collins405 commentedIm comparing two orders, one with the new patch, and one without, and neither of them seem to report the Client IP address in ubercart anyway.
I'm afraid I dont have access to my clients MySagePay account.
Comment #14
hanoiiThat's fine, I'll try to confirm that it works looking at SagePay but at least it doesn't break anything. Patch was simple and clear though.
Thanks for reporting and testing!