Announcement

Collapse
No announcement yet.

order details passed to paypal

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

    #16
    Hi Tracey,

    Any news on the phone number bit..?

    Best Regards,
    Mark

    http://www.arka-shop.co.uk
    Arka Tribal Jewellery

    Comment


      #17
      Sorry Mark, we'd put a support query into Paypal. I'll chase our developer who was dealing with them to see if there's a response yet?
      ********************
      Tracey
      SellerDeck

      Comment


        #18
        Hi Mark,

        We have a way of passing the telephone number but not sure what effect this will have at Paypal's end:

        - first take a backup of your current 'OCCPayPalTemplate.pl' file in your 'site/CommonOCC' folder
        - then open the file in a text editor such as 'notepad'
        - locate the line:

        Code:
        my ($nAreaCode, $nPart1, $nPart2);
        - you will see:

        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);
        - replace this with:

        Code:
        AddPostValues ('&', 'night_phone_b', $::InvoiceContact{PHONE}, $OPTION, $NOENCODE);
        This will then always pass the phone number entered in Actinic to the 'night_phone_b' variable at Paypal and will then display in the phone field at Paypal, however, we can't guarantee that this will work for all variations of phone numbers (ie US/UK/ with spaces / without spaces etc). I would think that if the majority of customers are from the UK then this will work but you would need to test it further for customers from other countries.
        ********************
        Tracey
        SellerDeck

        Comment


          #19
          Thanks Tracey,
          I'll give that a try.
          Best Regards,
          Mark

          http://www.arka-shop.co.uk
          Arka Tribal Jewellery

          Comment


            #20
            Well that does pass the phone number....

            It adds a +44 at the start? Regardless of which country you choose... Cant see how it does that.

            Whilst checking this using other countries, I've noticed that Actinic doesnt pass on the 'country' to Paypal..
            Whichever country you choose, when you get to Paypal it lists it as UK.

            Can we pass the country correctly to Paypal as well..?
            How would we do that?

            Best Regards,
            Mark

            http://www.arka-shop.co.uk
            Arka Tribal Jewellery

            Comment


              #21
              Looking at OCCPaypalTemplate.pl it doesnt look like the country variable is passed on to Paypal at all...?
              Code:
              AddPostValues ('&', 'first_name', $sFirstName, $OPTION, $REDIRECT);
              AddPostValues ('&', 'last_name', $sLastName, $ALWAYS, $REDIRECT);
              AddPostValues ('&', 'address1', $::InvoiceContact{ADDRESS1}, $ALWAYS, $REDIRECT);
              AddPostValues ('&', 'address2', $::InvoiceContact{ADDRESS2}, $OPTION, $REDIRECT);
              AddPostValues ('&', 'city', $::InvoiceContact{ADDRESS3}, $OPTION, $REDIRECT);
              AddPostValues ('&', 'state', $::InvoiceContact{ADDRESS4}, $OPTION, $REDIRECT);
              AddPostValues ('&', 'zip', $::InvoiceContact{POSTALCODE}, $OPTION, $REDIRECT);
              AddPostValues ('&', 'night_phone_b', $::InvoiceContact{PHONE}, $OPTION, $NOENCODE);
              AddPostValues ('&', 'email', $::InvoiceContact{EMAIL}, $OPTION, $NOENCODE);
              'country' is included in the html variable for prepopulating Paypal payment pages... according to the Paypal integration pdf.

              Code:
              TABLE A.8 HTML Variables for Prepoluating Payment Pages with Buyer Information
              Variable Description Requirements
              Character
              Limit
              address1 Street (1 of 2 fields) Alphanumeric 100
              address2 Street (2 of 2 fields) Alphanumeric 100
              city City Alphanumeric 40
              country Sets shipping and billing country. See
              Appendix C for allowable country codes.
              Alphabetic 2
              first_name First name Alphabetic 32
              last_name Last name Alphabetic 64
              It seems a bit duff that the original OCCPaypalTemplate doesnt pass on ; phone number, email address, or country ! doesnt it?

              So customers have to type this all in again at paypal.

              I've adjusted the template so now 'email' gets populated.. and 'phone number' (sort of).. Now i want 'country' to be populated as well.

              I've noticed that the country code in actinic for the UK is UK whereas Paypal wants it to be GB. I presume i can just change this in 'locations'

              I just need the correct snippet of code to put in OCCPaypalTemplate.pl to pass the country code to Paypal.

              I'm expecting its something like this...

              Code:
              AddPostValues ('&', 'country', $::InvoiceContact{country}, $OPTION, $NOENCODE);
              although the country is a 2 digit code..

              Any clues anyone?

              Mark
              Arka Tribal Jewellery

              Comment


                #22
                Hi Mark,

                Try the following:

                - open 'OCCPaypalTemplate.pl' in your site folder and search for:

                Code:
                AddPostValues ('&', 'zip', $::InvoiceContact{POSTALCODE}, $OPTION, $REDIRECT);
                - after the above enter:

                Code:
                my $sCountry = $::InvoiceContact{COUNTRY};
                $sCountry =~ s/^GB$/UK/;
                AddPostValues ('&', 'country', $sCountry, $OPTION, $REDIRECT);
                This should translate UK to GB if necessary and pass the country across. Don't change the country code in the locations list as this could cause problems elsewhere. Obviously, take a backup of your perl file before changing it.
                ********************
                Tracey
                SellerDeck

                Comment


                  #23
                  Hi Tracey,

                  Thanks for that, but unfortunately, it doesnt seem to work.

                  After including tha above code, Arriving at the Paypal page.. the country is always United Kingdom, whichever country i choose at the Actinic page...

                  Best Regards,
                  Mark

                  http://www.arka-shop.co.uk
                  Arka Tribal Jewellery

                  Comment


                    #24
                    Hi Mark,

                    I got the developers to take another look at it and they have suggested using the following code (this passes the country code whereas the previous passed the country name):

                    Code:
                    my $sCountry = $::g_LocationInfo{INVOICE_COUNTRY_CODE};
                    $sCountry =~ s/^GB$/UK/;
                    AddPostValues ('&', 'country', $sCountry, $OPTION, $REDIRECT);
                    ********************
                    Tracey
                    SellerDeck

                    Comment


                      #25
                      Hi Tracey,

                      Thanks for that, it seems to work well now..

                      Its much better... if someone now for example chooses 'germany' as their country, the paypal page they land on is now in German!
                      All looks lots better. Thanks.

                      Mark

                      http://www.arka-shop.co.uk
                      Arka Tribal Jewellery

                      Comment


                        #26
                        Hi, I have the same problem as this (v6) and have followed these instructions carefully, yet only the email address is coming through properly.

                        The phone number is coming through although is being prefixed with +012 and then the number I've typed which also starts 012

                        The country code doesn't seem to be acknowledged if it's anything other than Uk for some reason.

                        Has there been any development on this issue since the last post on this thread does anyone know?

                        Many thanks
                        Michelle

                        Comment


                          #27
                          Hi,

                          My set up is still working as it should, after following the above.
                          I'm afraid i dont know why yours shouldnt be... sorry,

                          Best Regards,
                          Mark

                          http://www.arka-shop.co.uk
                          Arka Tribal Jewellery

                          Comment


                            #28
                            Ok, thanks Mark.

                            This is my code snipet, I wonder if you or anyone might be able to spot the potential problem?

                            It's v6, I don't know if that makes a difference?

                            AddPostValues ('&', 'first_name', $sFirstName, $OPTION, $REDIRECT);
                            AddPostValues ('&', 'last_name', $sLastName, $ALWAYS, $REDIRECT);
                            AddPostValues ('&', 'address1', $::InvoiceContact{ADDRESS1}, $ALWAYS, $REDIRECT);
                            AddPostValues ('&', 'address2', $::InvoiceContact{ADDRESS2}, $OPTION, $REDIRECT);
                            AddPostValues ('&', 'city', $::InvoiceContact{ADDRESS3}, $OPTION, $REDIRECT);
                            AddPostValues ('&', 'state', $::InvoiceContact{ADDRESS4}, $OPTION, $REDIRECT);
                            AddPostValues ('&', 'zip', $::InvoiceContact{POSTALCODE}, $OPTION, $REDIRECT);
                            my $sCountry = $::g_LocationInfo{INVOICE_COUNTRY_CODE};
                            $sCountry =~ s/^GB$/UK/;
                            AddPostValues ('&', 'country', $sCountry, $OPTION, $REDIRECT);

                            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', $::InvoiceContact{PHONE}, $OPTION, $NOENCODE);
                            AddPostValues ('&', 'night_phone_c', $nPart2, $OPTION, $REDIRECT);
                            AddPostValues ('&', 'email', $::InvoiceContact{EMAIL}, $OPTION, $NOENCODE);
                            #
                            # end of the invoice address details
                            Many thanks in advance
                            Michelle

                            Comment


                              #29
                              Hi Michelle,

                              HHmm, your code doesnt look like mine, are you sure you followed the above carefully.. my code looks like this;

                              Code:
                              #
                              # supply the cardholder's address details
                              #
                              my ($sFirstName, $sLastName);
                              $sLastName = $::InvoiceContact{NAME};				# default to a blank first name and complete last name
                              if ($sLastName =~ /^([^ ]+) (.+)/)					# if the name field looks to contain at least two name parts
                              	{
                              	$sFirstName = $1;										# break the name up
                              	$sLastName = $2;
                              	}
                              AddPostValues ('&', 'first_name', $sFirstName, $OPTION, $REDIRECT);
                              AddPostValues ('&', 'last_name', $sLastName, $ALWAYS, $REDIRECT);
                              AddPostValues ('&', 'address1', $::InvoiceContact{ADDRESS1}, $ALWAYS, $REDIRECT);
                              AddPostValues ('&', 'address2', $::InvoiceContact{ADDRESS2}, $OPTION, $REDIRECT);
                              AddPostValues ('&', 'city', $::InvoiceContact{ADDRESS3}, $OPTION, $REDIRECT);
                              AddPostValues ('&', 'state', $::InvoiceContact{ADDRESS4}, $OPTION, $REDIRECT);
                              AddPostValues ('&', 'zip', $::InvoiceContact{POSTALCODE}, $OPTION, $REDIRECT);
                              my $sCountry = $::g_LocationInfo{INVOICE_COUNTRY_CODE};
                              $sCountry =~ s/^GB$/UK/;
                              AddPostValues ('&', 'country', $sCountry, $OPTION, $REDIRECT);
                              AddPostValues ('&', 'night_phone_b', $::InvoiceContact{PHONE}, $OPTION, $NOENCODE);
                              AddPostValues ('&', 'email', $::InvoiceContact{EMAIL}, $OPTION, $NOENCODE);
                              #
                              # end of the invoice address details
                              #
                              #
                              Good luck,
                              Mark
                              Arka Tribal Jewellery

                              Comment


                                #30
                                Many thanks Mark. I've made my code look identical to yours, although it hasn't made any difference

                                Maybe it's because I'm on v6 whereas you're on v7.

                                Comment

                                Working...
                                X