Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,669
    Plugin Contributions
    9

    Default question on ipn_main_handler and paypal functions

    i am getting the following error when inserting a specific record into the database:

    PHP Fatal error: 1366:Incorrect string value: '\xA0east ...' for column `paypal`.`address_state`

    the collation for the paypal table is utf8mb4_unicode_ci. the same for the address_state field in the table.

    i am not able to reproduce the error as the formatting of the error log is probably changing the actual bytes coming back from paypal.

    in looking at the paypal functions, i see we are just accepting whatever is posted back to the handler.

    in includes/modules/payment/paypal/paypal_functions.php i have tried:

    PHP Code:
    'address_state' => zen_db_prepare_input(preg_replace('/\xc2\xa0/i'' '$_POST['address_state'])), 
    but that does not seem to address this issue.

    i am open to any ideas.

    thanks in advance.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,625
    Plugin Contributions
    123

    Default Re: question on ipn_main_handler and paypal functions

    This is a wild guess, but FWIW:

    From phpMyAdmin (*not* Install SQL Patches) try

    alter table paypal convert to character set utf8 collate utf8_unicode_ci;
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,669
    Plugin Contributions
    9

    Default Re: question on ipn_main_handler and paypal functions

    Quote Originally Posted by swguy View Post
    This is a wild guess, but FWIW:

    From phpMyAdmin (*not* Install SQL Patches) try

    alter table paypal convert to character set utf8 collate utf8_unicode_ci;
    thank you for trying.

    FWIW:
    • i never use Install SQL patches.
    • the table is already is utf8mb4; moving it to utf8 would not solve the problem as utf8 is a subset of utf8mb4.
    • with regards to the previous point, i would check out the following link: https://tinyurl.com/2mq3p65n


    it is a confusing issue as most solutions talk about moving the character set TO utf8mb4 (which uses 4 bytes to store a character) from utf8. but in my situation, the character set is already at utf8mb4 for the column as well as the default for the table.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,571
    Plugin Contributions
    30

    Default Re: question on ipn_main_handler and paypal functions

    While not being able to offer a solution, I have seen a similar error message which I think confirms that this is an encoding issue.

    When re-installing yet another test zen cart,
    in \zc_install\includes\localConfig.php

    I have various things to set some defaults including updates for db constants (define('DEVELOPER_CONFIGS', [ etc...)
    one of which is the store address with a string of multibyte characters (with accents, that I can't write here or the post editor chokes), used to highlight any encoding problem.

    If this php file is mistakenly encoded as ANSI and not encoded in utf-8, I get the same error message as the original post.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 

Similar Threads

  1. v139a ipn_main_handler error from PayPal
    By jgold723 in forum PayPal Website Payments Pro support
    Replies: 0
    Last Post: 5 Mar 2014, 05:05 PM
  2. Help with paypal express: ipn_main_handler.php
    By shessorandom in forum PayPal Express Checkout support
    Replies: 14
    Last Post: 16 Jun 2012, 07:27 AM
  3. Paypal ipn_main_handler.php?type=ec Blank Page
    By vinogradov in forum Built-in Shipping and Payment Modules
    Replies: 19
    Last Post: 2 Nov 2010, 12:43 AM
  4. PayPal Express Checkout: Download ipn_main_handler.php
    By rhutchison in forum PayPal Express Checkout support
    Replies: 8
    Last Post: 6 Apr 2007, 07:36 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