Zen Cart Logo
Forums / Addon Payment Modules / WorldPay Module version 3.0 - Support thread

WorldPay Module version 3.0 - Support thread

Views: 37,829

Results 81 to 100 of 117
13 Apr 2018, 12:17 PM
#81
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

WorldPay Module version 3.0 - Support thread

philjclarke:

Sorry - when I said 'everything' I just meant on the cache directory - thought I'd take the nuclear option with it!
Still no joy :(

Okay cool, just checking.

I will recreate a similar session later this evening and let you know what happens, nothing else jumps to mind.:smile:

13 Apr 2018, 12:30 PM
#82
philjclarke avatar

philjclarke

New Zenner

Join Date:
Jan 2016
Location:
England
Posts:
9
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

Thanks - really do appreciate the help

13 Apr 2018, 4:04 PM
#83
philjclarke avatar

philjclarke

New Zenner

Join Date:
Jan 2016
Location:
England
Posts:
9
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

SpaceMonkey:

Okay cool, just checking.

I will recreate a similar session later this evening and let you know what happens, nothing else jumps to mind.:smile:

Hi @SpaceMoney - I resolved it this afternoon - it was down to some PHP session settings on the server in the end rather than ZC config.
Thanks for your help earlier.

13 Apr 2018, 5:11 PM
#84
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

philjclarke:

Hi @SpaceMoney - I resolved it this afternoon - it was down to some PHP session settings on the server in the end rather than ZC config.
Thanks for your help earlier.

Excellent. I'm pleased you resolved it. :cool:

I'm currently working on upgrading 2 of my takeaways running zen and quietly had my fingers crossed for an easy transition with WorldPay.

Happy Trading.

Regards

6 Jun 2018, 1:51 AM
#85
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

Hi all,

Has anyone noticed the size of their database whilst running this module?

I notice that it stores all transactions as blob data which have now mounted to quite a size..... +200mb. Even my email achieve isn't that big...….

Due to the size of the worldpay table I have been unable to restore the database successfully, I have manually restored each table (except worldpay) and can use my store still but things must be missing! Does anyone know how to calm this module down a little???? Is there a better way of storing the data for this module?

Any input greatfully received.

6 Jun 2018, 10:49 AM
#86
bottyz avatar

bottyz

New Zenner

Join Date:
Mar 2010
Location:
Nottingham UK
Posts:
90
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

SpaceMonkey:

Hi all,

Has anyone noticed the size of their database whilst running this module?

I notice that it stores all transactions as blob data which have now mounted to quite a size..... +200mb. Even my email achieve isn't that big...….

Due to the size of the worldpay table I have been unable to restore the database successfully, I have manually restored each table (except worldpay) and can use my store still but things must be missing! Does anyone know how to calm this module down a little???? Is there a better way of storing the data for this module?

Any input greatfully received.

Hi SpaceMonkey,

it is something I've noticed before, but not to your extremes.

How many records do you have? I've over 2500 with a table size of approx. 20Mb. An average blob in my db is only 2-3kb.
Each blob saves anywhere upto 6,000 characters. Is there a more space efficient data type within mysql to store that number of characters?
TBH I'm not sure if it is essential to record all of the various blobs, i.e. could we drop the 'session blob'. Is it ever used by anyone and for what purpose?

I've been tweaking a version of the module to try and incorporate a few improvements, but dealing with the support agents at Worldpay to ensure we're utilising the best options is not only time consuming, but confusing too (I don't think half their tech support team know how to communicate with their gateway).

If there's no reason to keep all the blob info, we could look to ditch some of it in a newer module.

Rich

6 Jun 2018, 11:22 AM
#87
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

bottyz:

How many records do you have? I've over 2500 with a table size of approx. 20Mb. An average blob in my db is only 2-3kb.

Hi Bottyz,

I have approx. 14000 entries, each blob about 2-3kb for Post, Server & Request but I note the Session is about 9-12kb each.

I have never referred to the data here. If a callback error happens the best source of data for me is the Callback Failure email sent from worldpay. As for their support staff...…… They are administrators and not support (in my opinion), they appear to have no technical knowledge unless you want help using their control panel.

My development zone hasn't had this table data loaded and appears fine. I am thinking about dropping 10000 of the entries (from the live site) but I'm waiting for my hosting support to respond first (checking they can restore if necessary).

Slightly of topic I have had databases larger than this in the past and managed to restore with "import" in phpmyadmin no problem... Every table except worldpay restores fine. I will let you know what my host say regarding this and how the cull goes.

Thanks for response.

6 Jun 2018, 11:26 AM
#88
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

bottyz:

I've been tweaking a version of the module to try and incorporate a few improvements, but dealing with the support agents at Worldpay to ensure we're utilising the best options is not only time consuming, but confusing too (I don't think half their tech support team know how to communicate with their gateway).

If there's no reason to keep all the blob info, we could look to ditch some of it in a newer module.

Rich

I have WorldPay v4 available (created by Niccol not me) if you wanted to review the work as part of your process. PM if you want a copy.

Regards

6 Jun 2018, 8:56 PM
#89
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: WorldPay Module version 3.0 - Support thread

Here are my thoughts, just out of interest...

(1) I am not sure why those columns are mediumblob anyway. This seems like a really poor choice. (So, if someone rewrites they could consider this)

(2) Anyway, I don't think (but may be wrong) that all that data that is stored in blob format is ever used. I think it is just record keeping, of the state when the payment was processed, which is a good thing in some circumstances and may be a compliance issue .... maybe possibly.

(3) If it is decided that you need to store that information then it could be stored in a different table or even dumped to log files. Log files might be a nice solution and then the feature could be turned on/off as is done for some other payment modules logging.

(4) There is not a huge amount to recommend Worldpay as a web payment gateway. The interface and communication are just plain nasty in my opinion. I understand that the POS stuff works better and Worldpay is cheap, but I would really consider another option.

It is (4) that is the kicker for me. I got involved in trying to understand and streamline the module and ran away screaming. Happy to give some advice/opinions but I do not want to get into the nitty-gritty of this module. I value my sanity to highly :-)

Nick
iszent.com

6 Jun 2018, 8:59 PM
#90
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: WorldPay Module version 3.0 - Support thread

Out of interest what are the factors that make you both choose Worldpay rather than, for instance, Sagepay?

Nick
iszent.com

7 Jun 2018, 12:26 AM
#91
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

niccol:

Out of interest what are the factors that make you both choose Worldpay rather than, for instance, Sagepay?

My Boss! lol :yes:

No seriously it's cost. With the added benefit of PCI certification in 10 minutes rather than days. Sage (at the time) didn't compete.

7 Jun 2018, 1:07 AM
#92
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

niccol:

(1) I am not sure why those columns are mediumblob anyway. This seems like a really poor choice. (So, if someone rewrites they could consider this)

Unusable data to me.

niccol:

(2) Anyway, I don't think (but may be wrong) that all that data that is stored in blob format is ever used. I think it is just record keeping, of the state when the payment was processed, which is a good thing in some circumstances and may be a compliance issue .... maybe possibly.

Possibly maybe.... Have you ever sat and had a read of the PCI DSS SAQ level 4 plus guidance notes? Unless it's your subject it can really make you feel incompetent. :lamo:

I'm going to backup my tables by exporting the data and then dropping table data older than 12mths, for me it then makes it manageable, GDPR compliant (I think) whilst keeping PCI compliance data available and complying to the full length of the law (UK). So yes If someone did add a trim function please consider an export function too.

Good luck!

7 Jun 2018, 1:50 AM
#94
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

gilby:

Could a lot of that data be "debug" data
Is there a debug setting, and is it turned on?

This module emails debug data with an option in Admin for mail distribution list. I remember I used it previously but not great reporting. Also worldpay email callback dumps with response data only on failure. Debug always emails... Everything.

The data table names are request, session, post, & server. Remembering this is an off site payment module I think this is the raw data encrypted!

7 Jun 2018, 2:12 AM
#95
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

Looked a bit deeper..... its the data for the admin > customers > worldpay payments

example:

Original Billing Address: 
17 Any Road
Suburb
Town
 
WorldPay CC Address: 
17 Any Road
Another Town
Warning: Address Mismatch 

Which of course is part of your AVS and other cross checks with worldpay.... or so my understanding of this goes.

7 Jun 2018, 6:58 AM
#96
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: WorldPay Module version 3.0 - Support thread

The module stores the complete state at the time of processing. So, all the post variables, all the session variables, all the server variables, and all the request variables. I think this is just someone in the past thinking one of two things. Either that some of this stuff may be useful for compliance. Or that they don't really know so they are going to store it anyway.

The code block looks like this (so would be easy enough to change to disable the storage of this data).

		$str['POST'] = base64_encode(serialize($_POST));
		$str['SESSION'] = base64_encode(serialize($_SESSION));
		$str['SERVER'] = base64_encode(serialize($_SERVER));
		$str['REQUEST'] = base64_encode(serialize($_REQUEST));
		
		if($_REQUEST['transStatus'] == 'C'){
				$_POST['transId'] = 'Cancelled';
				$_REQUEST['transId'] = 'Cancelled';
		}

		$db->Execute("INSERT INTO `".TABLE_WORLDPAY_PAYMENTS."` (cartId, worldpay_transaction_id, POST, SESSION, SERVER, REQUEST) VALUES ('".zen_db_input($_POST['cartId'])."', '".zen_db_input($_POST['transId'])."', '". $str['POST'] ."', '". $str['SESSION'] ."', '". $str['SERVER'] ."', '". $str['REQUEST'] ."')");

As I say, I do not want to get into the nitty-gritty of this, and yes I have read my way through the PCI guidance notes. I don't think that this is a compliance issue but I am not an expert.

My solution would always be to use another gateway. This is because the underlying methods of Worldpay are just horrible. I understand that Worldpay is slightly cheaper but as a programmer and not a business owner I don't think the savings are worth it. Different perspectives.

Nick
iszent.com

7 Jun 2018, 7:08 AM
#97
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

niccol:

The module stores the complete state at the time of processing. So, all the post variables, all the session variables, all the server variables, and all the request variables. I think this is just someone in the past thinking one of two things. Either that some of this stuff may be useful for compliance. Or that they don't really know so they are going to store it anyway.

The code block looks like this (so would be easy enough to change to disable the storage of this data).

	$str['POST'] = base64_encode(serialize($_POST));
	$str['SESSION'] = base64_encode(serialize($_SESSION));
	$str['SERVER'] = base64_encode(serialize($_SERVER));
	$str['REQUEST'] = base64_encode(serialize($_REQUEST));
	
	if($_REQUEST['transStatus'] == 'C'){
			$_POST['transId'] = 'Cancelled';
			$_REQUEST['transId'] = 'Cancelled';
	}

	$db->Execute("INSERT INTO `".TABLE_WORLDPAY_PAYMENTS."` (cartId, worldpay_transaction_id, POST, SESSION, SERVER, REQUEST) VALUES ('".zen_db_input($_POST['cartId'])."', '".zen_db_input($_POST['transId'])."', '". $str['POST'] ."', '". $str['SESSION'] ."', '". $str['SERVER'] ."', '". $str['REQUEST'] ."')");
> 
> As I say,  I do not want to get into the nitty-gritty of this,  and yes I have read my way through the PCI guidance notes.  I don't think that this is a compliance issue but I am not an expert.  
> 
> My solution would always be to use another gateway.  This is because the underlying methods of Worldpay are just horrible. I understand that Worldpay is slightly cheaper but as a programmer and not a business owner I don't think the savings are worth it.  Different perspectives.

I agree, not the nicest experience for the customer either.
20 Jun 2018, 5:17 PM
#98
bonheddwr avatar

bonheddwr

Zen Follower

Join Date:
Jun 2007
Location:
Cymru
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

Hi all. The plugin works great for me other than one issue. After people choose to pay via WorldPay, they are taken to the WorldPay site. All the processing is done there, and the customer returns to the Zen Cart order confirmation page. Everything seems fine,tbut the issue is that none of the Worldpay orders are logged under 'Transactions' in our Google Analytics account. All orders placed on our site using Paypal are logged on Analytics but not the Worldpay ones. This has been an ongoing issue for us. Today I copied all of the clean files again from the plugin to our server. The only changes I have made (changes made by the developer) is to change the following code in includes/modules/payment/worldpay.php.

      function selection() {

        if(sizeof(explode(',', trim(MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC_LIST)))>0 && MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC_LIST !='--none--' && MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC != 'False'){
            switch(MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC){
            case 'Radio Buttons' :
            return array('id' => $this->code,
                        'module' => $this->title.$this->_draw_radio_menu($this->_cc_map(), $_SESSION['paymentType'] ));
            break;
            case 'Select Box':
            $this->cc_drop = array();
            array_walk($this->_cc_map(), array('worldpay', 'cc_split'));
            return array('id' => $this->code,
                        'module' => $this->title.'</label> '.zen_draw_pull_down_menu("paymentType", $this->cc_drop, $_SESSION['paymentType'] ).'<label>' );
            break;
            default:
            return array('id' => $this->code,
                        'module' => $this->title);
            }
        }else{
        return array('id' => $this->code,
                'module' => $this->title);
        }

      }

to:

      function selection() {

        if(sizeof(explode(',', trim(MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC_LIST)))>0 && MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC_LIST !='--none--' && MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC != 'False'){
            switch(MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC){
            case 'Radio Buttons' :
            return array('id' => $this->code,
                        'module' => $this->title.$this->_draw_radio_menu($this->_cc_map(), $_SESSION['paymentType'] ));
            break;
            case 'Select Box':
            $this->cc_drop = array();
            array_walk($this->_cc_map(), array('worldpay', 'cc_split'));
            return array('id' => $this->code,
                        'module' => $this->title.'</label><p align="center"><img src=https://www.cadwyngifts.com/images/cardiau-credyd-cadwyn.png border=0 alt="Card payments supported by Worldpay"></p> '.zen_draw_pull_down_menu("paymentType", $this->cc_drop, $_SESSION['paymentType'] ).'<label>' );
            break;
            default:
            return array('id' => $this->code,
                        'module' => $this->title.'<p style="margin: 0px;"><img src=https://www.cadwyngifts.com/images/cardiau-credyd-cadwyn.png border=0 alt="Card payments supported by Worldpay"></p></label> ');
            }
        }else{
        return array('id' => $this->code,
                'module' => $this->title.'<p style="margin: 0px;"><img src=https://www.cadwyngifts.com/images/cardiau-credyd-cadwyn.png border=0 alt="Card payments supported by Worldpay"></p></label>' );
        }

      }

Other than that it a clean installation.

Could the changes above be somehow stopping Google Analytics from logging any Worldpay orders made on our site cadwyngifts.com ? I hope the above is clear. I would greatly appreciate any feedback.

20 Jun 2018, 5:29 PM
#99
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: WorldPay Module version 3.0 - Support thread

bonheddwr:

Hi all. The plugin works great for me other than one issue. After people choose to pay via WorldPay, they are taken to the WorldPay site. All the processing is done there, and the customer returns to the Zen Cart order confirmation page. Everything seems fine,tbut the issue is that none of the Worldpay orders are logged under 'Transactions' in our Google Analytics account. All orders placed on our site using Paypal are logged on Analytics but not the Worldpay ones. This has been an ongoing issue for us. Today I copied all of the clean files again from the plugin to our server. The only changes I have made (changes made by the developer) is to change the following code in includes/modules/payment/worldpay.php.

  function selection() {

    if(sizeof(explode(',', trim(MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC_LIST)))>0 && MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC_LIST !='--none--' && MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC != 'False'){
        switch(MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC){
        case 'Radio Buttons' :
        return array('id' => $this->code,
                    'module' => $this->title.$this->_draw_radio_menu($this->_cc_map(), $_SESSION['paymentType'] ));
        break;
        case 'Select Box':
        $this->cc_drop = array();
        array_walk($this->_cc_map(), array('worldpay', 'cc_split'));
        return array('id' => $this->code,
                    'module' => $this->title.'</label> '.zen_draw_pull_down_menu("paymentType", $this->cc_drop, $_SESSION['paymentType'] ).'<label>' );
        break;
        default:
        return array('id' => $this->code,
                    'module' => $this->title);
        }
    }else{
    return array('id' => $this->code,
            'module' => $this->title);
    }

  }
> 
> to:
> 
> ```
      function selection() {

        if(sizeof(explode(',', trim(MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC_LIST)))>0 && MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC_LIST !='--none--' && MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC != 'False'){
            switch(MODULE_PAYMENT_WORLDPAY_ACCEPTED_CC){
            case 'Radio Buttons' :
            return array('id' => $this->code,
                        'module' => $this->title.$this->_draw_radio_menu($this->_cc_map(), $_SESSION['paymentType'] ));
            break;
            case 'Select Box':
            $this->cc_drop = array();
            array_walk($this->_cc_map(), array('worldpay', 'cc_split'));
            return array('id' => $this->code,
                        'module' => $this->title.'</label><p align="center"><img src=https://www.cadwyngifts.com/images/cardiau-credyd-cadwyn.png border=0 alt="Card payments supported by Worldpay"></p> '.zen_draw_pull_down_menu("paymentType", $this->cc_drop, $_SESSION['paymentType'] ).'<label>' );
            break;
            default:
            return array('id' => $this->code,
                        'module' => $this->title.'<p style="margin: 0px;"><img src=https://www.cadwyngifts.com/images/cardiau-credyd-cadwyn.png border=0 alt="Card payments supported by Worldpay"></p></label> ');
            }
        }else{
        return array('id' => $this->code,
                'module' => $this->title.'<p style="margin: 0px;"><img src=https://www.cadwyngifts.com/images/cardiau-credyd-cadwyn.png border=0 alt="Card payments supported by Worldpay"></p></label>' );
        }

      }

Other than that it a clean installation.

Could the changes above be somehow stopping Google Analytics from logging any Worldpay orders made on our site cadwyngifts.com ? I hope the above is clear. I would greatly appreciate any feedback.

It will be because of the weird 'order confirmation' page that Worldpay uses.

By which I mean that the page after the customer enters their details ssuccessfully is generataed by the worldpay server rather than your server. The GA code will be on the page that your server generates so may never get actioned in the Worldpay way of doing things.

So, I think that the good news is that it has not got to do with the changes that your developer has made. The bad news is that it is going to be challenging to rectify.

:-)

Nick
iszent.com

21 Jun 2018, 11:48 AM
#100
bonheddwr avatar

bonheddwr

Zen Follower

Join Date:
Jun 2007
Location:
Cymru
Posts:
124
Plugin Contributions:
0

Re: WorldPay Module version 3.0 - Support thread

niccol:

It will be because of the weird 'order confirmation' page that Worldpay uses.

By which I mean that the page after the customer enters their details ssuccessfully is generataed by the worldpay server rather than your server. The GA code will be on the page that your server generates so may never get actioned in the Worldpay way of doing things.

So, I think that the good news is that it has not got to do with the changes that your developer has made. The bad news is that it is going to be challenging to rectify.

:-)

Thanks Nicco for the information! I have heard many people complain about WorldPay's weird setup! But the strange thing is, other people seem to use the WorldPay and GA plugins, and the orders are logged in their analytics. Could it be something to do with the options I have chosen on the Worldpay site itself therefore?