Announcement

Collapse
No announcement yet.

Tel. no. value passed from Actinic to Paypal...?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Tel. no. value passed from Actinic to Paypal...?

    Hello,

    I'm developing a new site that has PayPal integration, and have found that if the customer's tel. no. is entered in one string (e.g. 01234567890 instead of 01234 567890), the number becomes 012-456-7890 in the PayPal checkout screen.

    Is this a known problem? I couldn't find any previous threads mentioning it. Do I need to make a change somewhere in Actinic (OCCPayPalTemplate.pl presumably) or is it a bug perhaps in the interface between Actinic & PayPal?

    The Perl script has this section of code:-

    my ($nAreaCode, $nPart1, $nPart2);
    $nPart2 = $::InvoiceContact{PHONE};
    if ($nPart2 =~ /(\d{3}).*(\d{3}).*(\d{4})/)
    {
    $nAreaCode = $1;
    $nPart1 = $2;
    $nPart2 = $3;
    }

    AddPostValues ('&', 'night_phone_a', $nAreaCode, $OPTION, $NOENCODE);
    AddPostValues ('&', 'night_phone_b', $nPart1, $OPTION, $NOENCODE);
    AddPostValues ('&', 'night_phone_c', $nPart2, $OPTION, $REDIRECT);

    I don't speak Perl but I assume this is chopping up the string of numbers to pass as variables to PayPal.

    I'm using v7.0.5 by the way.

    Thanks for any ideas,

    Mark


    #2
    That Perl is looks wrong. It's looking for 3,3,4 digits and discarding anything that comes in between them. So, as you say, only 10 digits get passed to PayPal whenever there are 10 or more. Ooops! I'd use

    if ($nPart2 =~ /(\d{3})\D*(\d{3})\D*(\d{4})/)

    which will not remove any digits, but will remove any non digits that happen to separate that 3,3,4 pattern.

    As UK phone numbers don't always match this pattern I guess this is intended for the USA anyway.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment

    Working...
    X