Page 1 of 3 123 LastLast
Results 1 to 10 of 211

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Posts
    29
    Plugin Contributions
    0

    Default Re: Nixaks Sagepay Form Module

    If someone could help with adding an if / else statement in the code then we could get the billing info sent to SagePay if it is a download product and there is no delivery address.

    Here is the section of code inside the file called includes/modules/payment/sagepay_form.php.

    How do I add the statement in the section after this line:
    Code:
    $plain .= "BillingPhone=" . $order->customer['telephone'] . "&";
    In other words, the code must check to see if the customers delivery address OR postcode is empty. If both or any of the delivery fields are empty, it posts the billing address to SagePay instead.


    Code:
    $plain .= "BillingPhone=" . $order->customer['telephone'] . "&";	
    		$plain .= "DeliverySurname=" . $order->delivery['lastname'] . "&";
    		$plain .= "DeliveryFirstnames=" . $order->delivery['firstname'] . "&";
    		$plain .= "DeliveryAddress1=" . $order->delivery['street_address'] . "&";
          if (ACCOUNT_SUBURB == 'true') {
            $plain .= "DeliveryAddress2=" . $order->delivery['suburb'] . "&";
        }
    		$plain .= "DeliveryCity=" . $order->delivery['city'] . "&";
    		$plain .= "DeliveryPostCode=" . $order->delivery['postcode'] . "&";
    		$plain .= "DeliveryCountry=" . $order->delivery['country']['iso_code_2'] . "&";
    Would appreciate come help with this.thanks.

  2. #2
    Join Date
    Nov 2007
    Location
    Essex, UK
    Posts
    137
    Plugin Contributions
    1

    Default Re: Nixaks Sagepay Form Module

    Hi MaryF,
    I'm looking at the problem you've described but i'm a little confused, the delivery address is always the same as the billing address unless the customer specifies a different address, so Zen-cart will always have the delivery address and you should recieve no problems.

    What version of Zen-Cart are you using? and are you using any mods, especially ones that allow the customers to checkout without registering to your site?

  3. #3
    Join Date
    Apr 2008
    Posts
    29
    Plugin Contributions
    0

    Default Re: Nixaks Sagepay Form Module

    You are right! I have a fast and easy checkout module installed - it wasn't activated in admin so wasn't working yet. I had deactivated it a few weeks back in order to work on getting my shop transferred over from SagePay Direct to Form module.

    It seems to be working fine now! Thanks.

  4. #4
    Join Date
    Nov 2007
    Location
    Essex, UK
    Posts
    137
    Plugin Contributions
    1

    Default Re: Nixaks Sagepay Form Module

    Your welcome MaryF

  5. #5
    Join Date
    Apr 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Nixaks Sagepay Form Module

    Hey Nixak, thanks for a great module, but I'm having some trouble with the configuration, and I was hoping you might be able to help me out.

    It seems that the module is not sending the TxType data to Sage Pay. I keep getting the following error:

    ---
    This transaction attempt has failed. We are unable to redirect you back to the web store from which you were purchasing. The details of the failure are given below.

    Status: MALFORMED

    Status Detail: 3039 : The TxType or PaymentType is missing.
    ---

    I have the module configured to "test," and the vendor name and encryption password are correct.

    I tested the system with SagePay's testvendor account as well, and send the query to their showpost page, and got the following:

    ---
    The Request.Form Collection

    VPSProtocol = 2.23
    TxType =
    Vendor = testvendor
    Crypt = [LEFT OUT BECAUSE IT'S HUGE]
    btn_submit.x = 62
    btn_submit.y = 15

    ---

    As you can see, there seems to be no TxType being sent to SagePay.

    Any idea what might be going on?

  6. #6
    Join Date
    Nov 2007
    Location
    Essex, UK
    Posts
    137
    Plugin Contributions
    1

    Default Re: Nixaks Sagepay Form Module

    Hi KCMP, sorry to hear your having a problem.
    Couple of things I need to check, are you using the latest version of the module? (1.3 is the current one) and are you using the up-to-date version of zen-cart? (1.3.8a) if not I would recommend updating. If you are up-to-date the only thing I can think of is that the one of the files was corrupted whilst uploading to your site (I've had this happen with certain ftp programs that I no longer use) so try deleting the two sagepay_form.php files and re-upload them. If this fails please let me know and I will try to resolve it asap.

    Regards
    Nixak

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Nixaks Sagepay Form Module

    Pssst. Update version of Zen Cart is 1.3.9a.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #8
    Join Date
    May 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: Nixaks Sagepay Form Module

    Quote Originally Posted by MaryF View Post
    If someone could help with adding an if / else statement in the code then we could get the billing info sent to SagePay if it is a download product and there is no delivery address.

    Here is the section of code inside the file called includes/modules/payment/sagepay_form.php.

    How do I add the statement in the section after this line:
    Code:
    $plain .= "BillingPhone=" . $order->customer['telephone'] . "&";
    In other words, the code must check to see if the customers delivery address OR postcode is empty. If both or any of the delivery fields are empty, it posts the billing address to SagePay instead.


    Code:
    $plain .= "BillingPhone=" . $order->customer['telephone'] . "&";	
    		$plain .= "DeliverySurname=" . $order->delivery['lastname'] . "&";
    		$plain .= "DeliveryFirstnames=" . $order->delivery['firstname'] . "&";
    		$plain .= "DeliveryAddress1=" . $order->delivery['street_address'] . "&";
          if (ACCOUNT_SUBURB == 'true') {
            $plain .= "DeliveryAddress2=" . $order->delivery['suburb'] . "&";
        }
    		$plain .= "DeliveryCity=" . $order->delivery['city'] . "&";
    		$plain .= "DeliveryPostCode=" . $order->delivery['postcode'] . "&";
    		$plain .= "DeliveryCountry=" . $order->delivery['country']['iso_code_2'] . "&";
    Would appreciate come help with this.thanks.

    Hi,

    I've had the same problem as above and I've added a couple of lines that basically check to see if the Delivery information is missing ( to be specific I check the street address and country ) and if it is I copy the billing details into the delivery details array.

    I've tested it and it works fine for me.

    See modified file attached with the updated code commented.
    I hope someone else will find it usefull

    Regards,

    Mark
    www.avova.ie
    Attached Files Attached Files

  9. #9
    Join Date
    May 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: Nixaks Sagepay Form Module

    Oh and I forgot to thank you Nixak for the great module.

    If you need any help with testing/developing it further please just let me know.

    Regards,

    Mark
    www.avova.ie

  10. #10
    Join Date
    Nov 2007
    Location
    Essex, UK
    Posts
    137
    Plugin Contributions
    1

    Default Re: Nixaks Sagepay Form Module

    Hi avova, I just wanted to ask you about that delivery address problem as I don't sell virtual products so it's a little difficult for me lol.

    As I understand it from my store when the customer registers to the store they enter the main address ie the billing address and then when they order they can either have the goods sent to that address or enter a new address. If they do not enter a new delivery address then zen-cart automaticly sends the billing address as the delivery address, so you should not have a problem unless you are using a mod that allows your customers to order without registering to your site.

    Is there something different with virtual products? which causes the problem listed above and if so could you give me as much detail as possable so as I can re-code the module to help you all.

    Regards
    Nixak

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Sagepay Form V1.5.5
    By Nick1973 in forum Addon Payment Modules
    Replies: 10
    Last Post: 12 Jun 2019, 10:30 AM
  2. Need a Form Module for Sagepay
    By ukstuff in forum Addon Payment Modules
    Replies: 5
    Last Post: 18 Feb 2015, 03:51 PM
  3. v150 Nixaks Sagepay Form Module PHP Warning
    By sprocker in forum Addon Payment Modules
    Replies: 0
    Last Post: 13 Aug 2014, 11:24 AM
  4. looking for the protx - sagepay - FORM payment module
    By abs007 in forum Addon Payment Modules
    Replies: 3
    Last Post: 20 Jul 2009, 06:06 PM
  5. Help with Sagepay form payment module please
    By Nixak in forum Addon Payment Modules
    Replies: 1
    Last Post: 20 Jul 2009, 11:39 AM

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