Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1
    Join Date
    Jan 2010
    Posts
    36
    Plugin Contributions
    0

    bug Beanstream or CP Shipping Module? 64 Character Limit

    Hey guys...

    Just had one transaction get refused by Beanstream. Error is as follows:

    Shipping method must be less than 64 characters
    - Your credit card could not be authorized for this reason. Please
    correct the information and try again or contact us for further
    assistance.
    So it turns out that the shipping option he has selected is:

    Canada Post (1 box(es)) (Domestic Lettermail: estimated 2-4 business days):
    OBVIOUSLY more than 64 characters...

    Problem is I can't find where that is being generated. In my "/includes/languages/english/modules/shipping/canadapost.php"

    I have already changed:

    define('MODULE_SHIPPING_PACKAGING_RESULTS', ' box(es) to be shipped');

    to:

    define('MODULE_SHIPPING_PACKAGING_RESULTS', ' box(es)');

    And I can't find any reference to this or a "Letter" module component in the Beasnstream payment module.

    Any help directing me to where the shipping description is generated greatly appreciated!

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    5,522
    Plugin Contributions
    209

    Default Re: Beanstream or CP Shipping Module? 64 Character Limit

    In ./includes/modules/payment/beanstream.php, try changing the two references to

    $order->info['shipping_method']

    to (say)

    substr($order->info['shipping_method'], 0, 30);
    That Software Guy, Plugin Moderator. Store: Zen Cart Modifications
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  3. #3
    Join Date
    Jan 2010
    Posts
    36
    Plugin Contributions
    0

    Default Re: Beanstream or CP Shipping Module? 64 Character Limit

    OK..I found the line but am code-weak and am not sure how to add what you suggested.

    What I change it to:

    Code:
    'shipName' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],
                             'shipAddress1' => $order->delivery['street_address'],
                             'shipAddress2' => $order->delivery['suburb'],
                             'shipCity' => $order->delivery['city'],
                             'shipProvince' => $province_code_ship,
                             'shipPostalCode' => $order->delivery['postcode'],
                             'shipCountry' => $order->delivery['country']['iso_code_2'],
                             'substr($order->info['shipping_method'], 0, 30);
    Original

    Code:
    'shipName' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],
                             'shipAddress1' => $order->delivery['street_address'],
                             'shipAddress2' => $order->delivery['suburb'],
                             'shipCity' => $order->delivery['city'],
                             'shipProvince' => $province_code_ship,
                             'shipPostalCode' => $order->delivery['postcode'],
                             'shipCountry' => $order->delivery['country']['iso_code_2'],
                             'shippingMethod' => $order->info['shipping_method'];
    Is this how it's supposed to look?

  4. #4
    Join Date
    Jan 2010
    Posts
    36
    Plugin Contributions
    0

    Default Re: Beanstream or CP Shipping Module? 64 Character Limit

    When I make the code changes I get this error:

    Parse error: syntax error, unexpected '(', expecting ')' in /home/neitarms/public_html/includes/modules/payment/beanstream.php on line 338
    in the administrator back end, Payment module page. Only three Authorize.net modules load, all the rest don't load.

    This is my line 338:

    'substr'($order->info['shipping_method'], 0, 30);

  5. #5
    Join Date
    Jan 2004
    Posts
    64,336
    Blog Entries
    6
    Plugin Contributions
    204

    Default Re: Beanstream or CP Shipping Module? 64 Character Limit

    No, you should have replaced ONLY EXACTLY what swguy told you, not the entire line.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Jan 2010
    Posts
    36
    Plugin Contributions
    0

    Default Re: Beanstream or CP Shipping Module? 64 Character Limit

    OK. I just replaced the code, not the whole line.

    Still get the same error:

    Parse error: syntax error, unexpected ';', expecting ')' in /home/neitarms/public_html/includes/modules/payment/beanstream.php on line 338

    Here is the code as it looks now:

    Code:
    if (isset($order->delivery['street_address']) && $order->delivery['street_address'] != '') {
          $shipping_data = array(
    //                         'deliveryEstimate' => $order->delivery['shipping_method'],
                             'shipName' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],
                             'shipAddress1' => $order->delivery['street_address'],
                             'shipAddress2' => $order->delivery['suburb'],
                             'shipCity' => $order->delivery['city'],
                             'shipProvince' => $province_code_ship,
                             'shipPostalCode' => $order->delivery['postcode'],
                             'shipCountry' => $order->delivery['country']['iso_code_2'],
                             'shippingMethod' => substr($order->info['shipping_method'], 0, 30);
        } else {
          $shipping_data = array();
        }
        $extra_data = array(
                             'shippingMethod' => substr($order->info['shipping_method'], 0, 30),
                             'trnComments' => 'Website Order', // $order->info['comments'],
                             // Additional Merchant-defined variables go here
                             'ref1' => $_SESSION['customer_id'],
                             'ref2' => $order_time,
                             'ref3' => zen_get_ip_address(),
                             'ref4' => $sessID,
                             'customerIp' => zen_get_ip_address()
                              );

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    5,522
    Plugin Contributions
    209

    Default Re: Beanstream or CP Shipping Module? 64 Character Limit

    The first changed line you have

    'shippingMethod' => substr($order->info['shipping_method'], 0, 30);

    change to:

    'shippingMethod' => substr($order->info['shipping_method'], 0, 30)
    );
    That Software Guy, Plugin Moderator. Store: Zen Cart Modifications
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  8. #8
    Join Date
    Jan 2010
    Posts
    36
    Plugin Contributions
    0

    Default Re: Beanstream or CP Shipping Module? 64 Character Limit

    OK. I used Dreamweaver to figure out the error.

    Line needed to be:

    substr($order->info['shipping_method'], 0, 30));
    Was missing bracket.

    Code that lets me load the page is now:

    Code:
    if (isset($order->delivery['street_address']) && $order->delivery['street_address'] != '') {
          $shipping_data = array(
    //                         'deliveryEstimate' => $order->delivery['shipping_method'],
                             'shipName' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'],
                             'shipAddress1' => $order->delivery['street_address'],
                             'shipAddress2' => $order->delivery['suburb'],
                             'shipCity' => $order->delivery['city'],
                             'shipProvince' => $province_code_ship,
                             'shipPostalCode' => $order->delivery['postcode'],
                             'shipCountry' => $order->delivery['country']['iso_code_2'],
                             'shippingMethod' => substr($order->info['shipping_method'], 0, 30));
        } else {
          $shipping_data = array();
        }
        $extra_data = array(
                             'shippingMethod' => substr($order->info['shipping_method'], 0, 30),
                             'trnComments' => 'Website Order', // $order->info['comments'],
                             // Additional Merchant-defined variables go here
                             'ref1' => $_SESSION['customer_id'],
                             'ref2' => $order_time,
                             'ref3' => zen_get_ip_address(),
                             'ref4' => $sessID,
                             'customerIp' => zen_get_ip_address()
                              );

    Will update after testing this evening.

    Thanks folks!

  9. #9
    Join Date
    Jan 2010
    Posts
    36
    Plugin Contributions
    0

    Default Re: Beanstream or CP Shipping Module? 64 Character Limit

    Quote Originally Posted by swguy View Post
    In ./includes/modules/payment/beanstream.php, try changing the two references to

    $order->info['shipping_method']

    to (say)

    substr($order->info['shipping_method'], 0, 30);

    Thanks!

    Can you tell me what this actually does? LOL


  10. #10
    Join Date
    Jan 2004
    Posts
    64,336
    Blog Entries
    6
    Plugin Contributions
    204

    Default Re: Beanstream or CP Shipping Module? 64 Character Limit

    Sends only the first 30 characters of the shipping method.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v155 Character limit on MODULE_PAYMENT_INVOICE_TEXT_TITLE?
    By marton_1 in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 8 Aug 2016, 01:18 PM
  2. v139f Product Description Character Limit
    By snowbird32 in forum Basic Configuration
    Replies: 7
    Last Post: 11 Jun 2013, 06:45 PM
  3. Category description character limit
    By moesoap in forum Setting Up Categories, Products, Attributes
    Replies: 13
    Last Post: 3 Oct 2012, 04:08 PM
  4. Setting Character Limit
    By solarguy in forum General Questions
    Replies: 4
    Last Post: 16 Apr 2011, 11:20 PM
  5. Zone shipping character limit
    By Heather88 in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 1 May 2007, 04:20 AM

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