Page 5 of 48 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 475
  1. #41
    Join Date
    Nov 2004
    Location
    Glasgow, Scotland
    Posts
    251
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Michael,

    Glad to hear you finally got to the bottom of your problem - and sorry that you had to do this largely by yourself.

    Which version of PHP is installed on your server?

    I've eventually got round to doing some research as to why you had to change the code in includes/templates/template_default/templates/tpl_wpcallback_default.php as you indicated eg:

    Code:
    if(isset($HTTP_POST_VARS['transId'])) {$transId = $HTTP_POST_VARS[transId];}
    to

    Code:
    if(isset($_POST['transId'])) {$transId = $_POST[transId];}
    etc.

    It seems that $_POST was introduced in PHP v4.1 The data contained in this array is global.

    $HTTP_POST_VARS contains the same data as $_POST but the data is NOT global.

    For versions of PHP before v4.1 $HTTP_POST_VARS needs to be used or the code won't work. This is used in the WorldPay module since it should work for versions of PHP both before and after v4.1.

    EXCEPT that $HTTP_POST_VARS is now deprecated and is now turned off by default in newer versions of PHP (v5.1 on).

    So for all versions of PHP up to v 5.0 the current code will work. For servers with PHP v5.1 and above it won't work by default.

    The solution is to either configure the server so that $HTTP_POST_VARS is turned on or replace the existing code with the new code as per your post.

    Does anyone know of a more elegant solution, one which allows the code to work regardless of PHP version? Or should all code now use $_POST with the expectation that everyone should be using PHP 4.1 or greater?

    I imagine this will effect other areas of ZenCart.

    Regards,

    Alan

  2. #42
    Join Date
    Mar 2006
    Posts
    19
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Hi Duncan,

    Sorry for not explaining myself fully. What I meant was that I have set up the system for my friend and it's all setup live at WorldPay and also on the ZenCart module side.

    When I mentioned moneys and account I was referring to my own personal bank account that has been debited with the correct amount of money when I make purchases but the screen still displays "this is a test transaction" in the browser.

    In essence everything is working perfectly, but it displays "this is a test" to the customer.

    I was wondering if anyone had any ideas on fixing this or if I should just butcher the line of text out of the PHP file (which is not the ideal situation LOL).

    Many thanks for your help on this.

    Kind regards,

    Rikki

  3. #43
    Join Date
    Nov 2004
    Location
    Glasgow, Scotland
    Posts
    251
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Rikki,

    A number of questions for you - I need answers to them all unfortunately.

    When you say you have set it up live at WorldPay:

    1: Have you forwarded an Activation Request Form to WorldPay?
    2: Have WorldPay tested the installation and given you the go ahead to put through live transactions?

    This is very important since you should not send any live transactions (test mode 0 in the module admin) until WorldPay have activated the account.

    What is the 'Transaction Mode' set to in the module admin?

    In your WorldPay control panel configuration you should have the following settings:

    Callback URL: http://<wpdisplay item="MC_callback">

    Callback Enabled: box ticked

    Use callback response? : box ticked

    Attach callback data to failure email? : box ticked

    You should certainly not just 'butcher the line of text out'.

    in includes/templates/template_default/templates/tpl_wpcallback_default.php st lines 208 and 320 the code is

    Code:
    		  
    if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
    $testmode is sent by the Zencart script to WorldPay as part of the transaction token. WorldPay simply return this unchanged with their response. $testmode is set to the value of Transaction Mode set in the module admin - ie '0', '100', or '101'.

    The logic is if it's not '0' then it must be '100 or '101' so display the 'Test transaction' message.

    Regards,

    Alan

  4. #44
    Join Date
    Mar 2006
    Posts
    19
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Hi Alan,

    1. It has been tested and is live, WorldPay have been on to it and conducted their testing/audit/test purchase.

    2. Yes

    I've grabbed screens of everything you asked for here, see if there is anything you can spot as Ive gone a bit cross eyed looking at it all

    ***removed humongus screenshot***

    ...

    Kind regards,

    Rikki


    Quote Originally Posted by duncanad
    Rikki,

    A number of questions for you - I need answers to them all unfortunately.

    When you say you have set it up live at WorldPay:

    1: Have you forwarded an Activation Request Form to WorldPay?
    2: Have WorldPay tested the installation and given you the go ahead to put through live transactions?

    This is very important since you should not send any live transactions (test mode 0 in the module admin) until WorldPay have activated the account.

    What is the 'Transaction Mode' set to in the module admin?

    In your WorldPay control panel configuration you should have the following settings:

    Callback URL: http://<wpdisplay item="MC_callback">

    Callback Enabled: box ticked

    Use callback response? : box ticked

    Attach callback data to failure email? : box ticked

    You should certainly not just 'butcher the line of text out'.

    in includes/templates/template_default/templates/tpl_wpcallback_default.php st lines 208 and 320 the code is

    Code:
    		  
    if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
    $testmode is sent by the Zencart script to WorldPay as part of the transaction token. WorldPay simply return this unchanged with their response. $testmode is set to the value of Transaction Mode set in the module admin - ie '0', '100', or '101'.

    The logic is if it's not '0' then it must be '100 or '101' so display the 'Test transaction' message.

    Regards,

    Alan
    Last edited by Kim; 10 Nov 2006 at 06:34 PM.

  5. #45
    Join Date
    Mar 2006
    Posts
    19
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    ***removed humongus screenshot***

    ...
    Last edited by Kim; 10 Nov 2006 at 06:33 PM.

  6. #46
    Join Date
    Mar 2006
    Posts
    19
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    and the last one :

    ***removed humongus screenshot***


    Shows the money is indeed being transfered out of the customers credit / debit card account as noted above. That is for a previous purchase I made a few days ago as the one shown in the previous screen grabs obviously hasnt gone through the process of appearing on my statement just yet.

    Any ideas on this puzzler :S

    Kind regards,

    Rikki
    Last edited by Kim; 10 Nov 2006 at 06:33 PM.

  7. #47
    Join Date
    Nov 2004
    Location
    Glasgow, Scotland
    Posts
    251
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Rikki,

    Thanks for the comprehensive reply. It makes things so much easier to eliminate what is NOT causing the problem when you have all the information.

    You have the 'Transaction Mode' set to '0' so that is OK.

    Your WorldPay screenshots show that the purchase token received by WorldPay has $testMode = 0 otherwise each of the WorldPay screens would have

    'TEST MODE - this is not a live transaction'

    in red at the top.

    That's OK too.

    So there must be something wrong with the WorldPay response or the way your installation is handling the WorldPay response. This points to the file:

    includes/templates/template_default/templates/tpl_wpcallback_default.php

    or the version of this file you have in your custom template file e.g.

    includes/templates/your_custom_template/templates/tpl_wpcallback_default.php

    Have you customised this file in any way?

    Check the code at line 206. It should look like this:

    Code:
    <?php 
    	      //echo '<WPDISPLAY ITEM=banner>';
    		  if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
    		  echo WP_CONTACT_HEADING . "<br /><br />";
    	  	  echo $name . "<br/>";
    		  echo $address . "<br />";
    		  echo $postcode . "<br />";
    		  echo $country . "<br />";
    		  echo "Tel: " . $tel . "<br />";
    		  echo "Email: " . $email . "<br /><br />";		  
    		  echo WP_PAYMENT_HEADING . "<br /><br />";
    		  echo $authAmountString . " has been debited from your " . $cardType . " card.<br />";
    		  echo "Our ref: " . $cartId . "<br />";
    		  echo "Your WorldPay Transaction ID is " . $transId . "<br />"; 
    ?>

    This is the code which displays the information for a successful transaction. As I said in my previous post it's the following line which determines whether the 'Test transaction' message is displayed.
    Code:
     if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
    Also at line 319

    Code:
     <?php 
    	  //echo '<WPDISPLAY ITEM=banner>';
    	  if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
    	  echo WP_CANCELLED_HEADING . "<br /><br />";	  
    	  echo "Our ref: " . $cartId . "<br />";
    ?>

    This is the code for the information displayed when a transaction fails or is cancelled.

    Check that this two pieces of code have not been changed in any way.

    You could also add an additional line of code to test the value of $testMode being returned by WorldPay as follows:

    Code:
    echo '$testMode = ' . $testMode . "<br /><br />";
    This should be positioned so that the above two pieces of code now look like this:

    Code:
    <?php 
    	      //echo '<WPDISPLAY ITEM=banner>';
    	 	  echo '$testMode = ' . $testMode . "<br /><br />";
    		  if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
    		  echo WP_CONTACT_HEADING . "<br /><br />";
    	  	  echo $name . "<br/>";
    		  echo $address . "<br />";
    		  echo $postcode . "<br />";
    		  echo $country . "<br />";
    		  echo "Tel: " . $tel . "<br />";
    		  echo "Email: " . $email . "<br /><br />";		  
    		  echo WP_PAYMENT_HEADING . "<br /><br />";
    		  echo $authAmountString . " has been debited from your " . $cardType . " card.<br />";
    		  echo "Our ref: " . $cartId . "<br />";
    		  echo "Your WorldPay Transaction ID is " . $transId . "<br />"; 
    ?>
              <br />
    <?php
    and

    Code:
    <?php 
    	  //echo '<WPDISPLAY ITEM=banner>';
    	  echo '$testMode = ' . $testMode . "<br /><br />";
    	  if ($testMode !== 0) {echo WP_TEST_HEADING . "<br /><br />";}
    	  echo WP_CANCELLED_HEADING . "<br /><br />";	  
    	  echo "Our ref: " . $cartId . "<br />";
    ?>
    For a successful transaction you should see this on the callback page:

    Response from WorldPay:

    $testMode = x

    This is a TEST TRANSACTION. No money has changed hands

    Please check your contact details. If there are any errors please contact us immediately.

    Fred Flintstone
    Bedrock
    6000BC
    USA
    Tel: 1234 567 8910
    Email: fred AT theflintstones DOT com

    Your payment details are detailed below. If you have experienced any problems with your payment please contact WorldPay immediately.

    &#163;41.24 has been debited from your Visa card.
    Our ref: 12ee209e338e85761a568e2da2dcff39
    Your WorldPay Transaction ID is 190601916

    You will find WorldPay contact information here
    and for a failed or cancelled transaction you should see this on the callback page

    Response from WorldPay:

    $testMode = x

    This is a TEST TRANSACTION. No money has changed hands

    Your payment has been cancelled. Please contact us for alternative methods of payment. If you have experienced any problems with your payment please contact WorldPay immediately.

    Our ref: 12ee209e338e85761a568e2da2dcff39

    You will find WorldPay contact information here
    If x= 0 then all is well with the WorldPay callback response and the problem lies in your installation. If x = anything other than '0' then there is something wrong with the WorldPay response.

    To test this put through a test purchase but click on 'Cancel' once you reach the WorldPay payment pages. Testing using a cancelled transaction will save further transaction charges and debits on your credit card.

    Let me know how you get on.

    Alan
    Last edited by duncanad; 20 Aug 2006 at 09:11 PM.

  8. #48
    Join Date
    Aug 2004
    Posts
    75
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Hi all,

    A further question about the latest WordlPay module. We need a Worldpay account to support multiple websites and therefore it would be ideal if each Zen site could send a unqiue Order_Id style e.g. ABC123, DEF123. Currently we are using different Order ranges

    Site 1 - 10000+
    Site 2 - 30000+
    Site 3 - 50000+

    One problem we have is that although each Zen cart store can use a different Order number range, the ID that Worldpay seems to receive/display is not applicable.

    See attachment jpg.

    The result was as follows:

    Zen Cart Order Number = 10000
    WorldPage Ref = 32ea519b65894d887094
    WoldPay Transaction ID = 190893444

    Question - Is it possible to send a ref to Worldpay so we can change their reference to either “10000” or "ABC-10000" or even "ABC-190893444"

    Any help would be most appreciated

    Regards

    Jamie
    Attached Images Attached Images  

  9. #49
    Join Date
    Aug 2004
    Posts
    75
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Update - Just spoken with WorldPay and they said that they only return back the number or charcters that they are sent.

    If that's true, then this means we are sending them "190893444" -hummm, I can't believe that....

    Any help would be appreciated.

  10. #50
    Join Date
    Nov 2004
    Location
    Glasgow, Scotland
    Posts
    251
    Plugin Contributions
    0

    Default Re: WorldPay Module for ZenCartv1.3x

    Jamie,

    The way the WorldPay interface works is as follows:

    When a customer clicks the final 'Confirm' button in the checkout process a 'Purchase Token' is sent to WorldPay. This contains data such as the customers name and address, the value of the purchase etc. Most of this data is returned to the callback URL via the WorldPay response.

    I addition to the standard data you can include any data you want and, provided you use the correct naming conventions, WorldPay will use this data either in your WorldPay customised customer pages or return it unchanged in their response (or both).

    Unfortunately you cannot send your order number in the purchase token since the order is not created until a 'Success' response is received from WorldPay. If we were to create the order before sending the purchase token to WorldPay and the customer cancelled the order on the WorldPay screens or their card was rejected we would have an order to fulfill but no payment will have been processed.

    I'm afraid you are stuck with WorldPay's Transaction ID as this is their unique identifier for the transaction.

    The ZenCart Order Number appears on the callback 'Success' page. This is the earliest time that it can appear since it is newly created as part of the callback process. If you have set a range for each of your installations then each installation should have a unique set of Order Numbers. The Order Number is not provided in the WorldPay callback response it is created by Zencart as a result of a 'Success' response from WorldPay.

    I'm not sure what it is you want to use these references for. I do know that it can be difficult to cross reference ZenCart orders with transactions detailed in the WorldPay Statement. The WorldPay statement details the WorldPay Transaction ID and The ZenCart Cart ID. Although both these references appear on the callback page and in the Worldpay email they are not stored in the Orders table within the database. I think what you may really be after is for the WordPay Transaction ID to be stored in the Orders table and displayed in the Orders screens within the ZenCart admin. I know others have asked for this and I have in mind to do this when I revisit the module this month.

    If you want the Transction ID to be in the format "ABC-190893444" you will need to amend the following file:

    includes/templates/template_default/templates/tpl_wpcallback_default.php

    Change line 31 from:

    Code:
    	if(isset($HTTP_POST_VARS['transId'])) {$transId = $HTTP_POST_VARS[transId];}
    to:

    Code:
    	if(isset($HTTP_POST_VARS['transId'])) {$transId = 'ABC-' . $HTTP_POST_VARS[transId];}
    This will display the transaction ID as "ABC-190893444" on the callback page but will not store this value anywhere and the WorldPay Statement will still show the Transaction ID as "190893444" so I don't know if this will have achieved much.

    You can find out more about how the WorldPay Select Junior integration works on the support section of the WorldPay website at www.worldpay.co.uk

    I hope this helps.

    Regards,

    Alan

 

 
Page 5 of 48 FirstFirst ... 3456715 ... LastLast

Similar Threads

  1. v151 Worldpay module for 1.5.x is there one and where can I get it?
    By veronicathecow in forum Addon Payment Modules
    Replies: 26
    Last Post: 30 May 2015, 02:40 PM
  2. v153 WorldPay module for 1.5 ?
    By joecooper in forum Addon Payment Modules
    Replies: 2
    Last Post: 16 Mar 2015, 02:49 PM
  3. v150 WorldPay module
    By properjob in forum Addon Payment Modules
    Replies: 7
    Last Post: 16 Apr 2013, 11:55 AM
  4. Goldmine 8.5 and ZenCartv1.3.9d?
    By brackengirl in forum Managing Customers and Orders
    Replies: 0
    Last Post: 7 Jul 2010, 04:51 PM
  5. Worldpay Module
    By Steve B in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 10 Jul 2008, 02:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR