Register   Login
     
  Latest Posts  
RE: Google Maps
by smcculloch on 11/23/2008 10:29 AM
RE: I cant get rss feeds to work correctly
by smcculloch on 11/23/2008 10:27 AM
captcha still proken
by StatisticsIO on 11/23/2008 6:11 AM
RE: Comments RSS feeds
by StatisticsIO on 11/23/2008 6:09 AM
Regions and Copuntry List scripts for Location Types
by rodneyjoyce on 11/23/2008 4:56 AM
RE: BUG: Sort by: Price
by usheen on 11/23/2008 1:23 AM
RE: News Articles 301 Redirect
by mcox on 11/22/2008 11:16 PM
RE: I cant get rss feeds to work correctly
by davidthomson on 11/22/2008 11:14 PM
Google Maps
by bmurphy on 11/22/2008 11:11 PM
RE: News Articles 301 Redirect
by swebster on 11/22/2008 10:47 PM
  Forums  
Subject: Paypal payments fails
Prev Next
You are not authorized to post a reply.

Author Messages
Mariette KnapUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:650


10/25/2007 8:02 AM  

If I try to buy a subscription on your site the link to Paypal fails. Same on my site....what is wrong?



Subscribe for great articles and howtos. Get unlimited access to all content.
Mariëtte Knap
www.smallbizserver.net
Test UserUser is Offline
Gold Membership
Nuke Super Newbie
Nuke Super Newbie
Posts:14

10/25/2007 8:41 AM  
I'm looking into it now...
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


10/25/2007 8:56 AM  
I've posted a new build and sent you an IM, just waiting on you to test before officially releasing.

The issue was the locale parameter that had previously worked. It looked like paypal has changed something on their end that is causing this not to work anymore. The language param shows the text in paypal in that language. This language param was picked up from the browser. PayPal probably already picks it up from the browser anyway.

Scott McCulloch
Site Administrator
Mariette KnapUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:650


10/25/2007 11:11 AM  

Well, now we have a problem that was already there some time ago. Everybody who wants to buy a subscription on my site gets Paypal in Dutch and nobody understands that because all my customers are English. We must include a language parameter in the URL and force English language.



Subscribe for great articles and howtos. Get unlimited access to all content.
Mariëtte Knap
www.smallbizserver.net
Mariette KnapUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:650


10/25/2007 11:32 AM  

payment check out with wrong language on pay pal's web site - Website Payments Pro (US) - PayPal Developer Community:
http://www.paypaldeveloper.com/pdn/board/message?board.id=wppro&message.id=3555



Subscribe for great articles and howtos. Get unlimited access to all content.
Mariëtte Knap
www.smallbizserver.net
Mariette KnapUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:650


10/25/2007 11:34 AM  

PayPal Language IT - Store Module [Lead: Will Morgenweck] - DotNetNuke:
http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/114/threadid/177457/scope/posts/Default.aspx



Subscribe for great articles and howtos. Get unlimited access to all content.
Mariëtte Knap
www.smallbizserver.net
Mariette KnapUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:650


10/25/2007 1:14 PM  

I think I found the problem with the language of the checkout page. The reason this mod no longer works:


                Dim strAcceptLanguage As String
                Dim strSetLanguage As String

                'A language tag is a string that begins with the two-character
                'language code that identifies the language. If necessary to
                'distinguish regional differences in language, the language tag
                'may also contain a country code, which is another two-character
                'string. The language code and country code are separated by
                'a hyphen. For example, the language tag used to identify the
                'British English locale is "en-gb". I'm guesing that "gb" stands
                'for "Great Britain".

                'strAcceptLanguage = Mid(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"), 1, 2)

                ''If there is no Language available in the browser we will set default to 'us'

                'If Len(strAcceptLanguage) > 0 Then
                '    strSetLanguage = strAcceptLanguage
                'Else
                '    strSetLanguage = "us"
                'End If
                'strPayPalURL += "&lc=" & strSetLanguage

Is that Paypal changed the way the variable 'lc' should be set. It is now case sensitive and 'us' does not work but 'US' does. I would not add that string at the end of the URL but after the point where you set the currency.

Regards
Mariette Knap



Subscribe for great articles and howtos. Get unlimited access to all content.
Mariëtte Knap
www.smallbizserver.net
Richard EdwardsUser is Offline
Registered Users
Nuke Super Newbie
Nuke Super Newbie
Posts:11

10/25/2007 6:30 PM  

Thanks Mariette,

I was having the same issue and have received the following reply from PayPal support:

 

>> I have an update for you on this issue. Basically this is being caused by the server validating the value of variable lc in uppercase.
>> Workaround, so in you code if you pass lc=US instead of lc=us it works fine.
>> Anyway this issue is already fixed in the code and should be deployed in production today.

I tested with an upper case locale but that didn't seem to solve it, so I reverted to just sending &lc=US and that seemed to work in all cases. Hopefully they will have this working properly tomorrow so I can revert back to the proper lc codes.

 

 Richard Edwards

www.dnnstuff.com

 

Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


10/25/2007 6:51 PM  
I'm looking back into this now - you would have though PayPal would have done more testing before promoting there latest build.

Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


10/25/2007 8:34 PM  
I've made the changes locally to add the language parameters back in with proper upper casing and working off a fixed list.

I'll be adding a shipping option, then releasing the new build.

Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


10/25/2007 8:34 PM  
FYI, here is the new code:-

strAcceptLanguage = Mid(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"), 1, 2)

'If there is no Language available in the browser we will set default to 'us'

If Len(strAcceptLanguage) > 0 Then
strSetLanguage = strAcceptLanguage
Else
strSetLanguage = "us"
End If

' PayPal only handles uppercase chars now and a limited subset.
' "US" = English
' "FR" = French
' "DE" = German
' "IT" = Italian
' "ES" = Spanish
' "CN" = Chinese
' "AU" = Australian
' "GB" = United Kingdom
' "JP" = Japanese

Select Case strSetLanguage.ToLower()
Case "us"
strSetLanguage = "US"
Case "fr"
strSetLanguage = "FR"
Case "de"
strSetLanguage = "DE"
Case "it"
strSetLanguage = "IT"
Case "es"
strSetLanguage = "ES"
Case "cn"
strSetLanguage = "CN"
Case "au"
strSetLanguage = "AU"
Case "gb"
strSetLanguage = "GB"
Case "jp"
strSetLanguage = "JP"
Case Else
strSetLanguage = ""
End Select

If (strSetLanguage <> "") Then
strPayPalURL += "&lc=" & strSetLanguage
End If

Scott McCulloch
Site Administrator
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


10/25/2007 9:31 PM  
OK - I've released the new build now.

Scott McCulloch
Site Administrator
Mariette KnapUser is Offline
Gold Membership
Nuke Master
Nuke Master
Posts:650


10/25/2007 11:49 PM  

The language code does not work for me. I have my browser set to en-gb and nothing happens. I cannot see any string added in the URL and I am send to a dutch Paypal site which should NOT be the case because everything I have is English here. My Windows XP is English and the default language in my Paypal profile is also set to English.



Subscribe for great articles and howtos. Get unlimited access to all content.
Mariëtte Knap
www.smallbizserver.net
Scott McCullochUser is Offline
Administrators
Nuke Master
Nuke Master
Posts:12450


10/25/2007 11:52 PM  
The language parameter comes from your web browser, the code is very similar to what is there previously, but with the addition of casing and the fixed list that you provided.

If I add "german" in IE7 as a language and click on the subscribe link, I'm taking to PayPal with it in german.

I will test with en-GB now.

Scott McCulloch
Site Administrator
You are not authorized to post a reply.
Forums > Modules > Subscription Tools > Paypal payments fails



ActiveForums 3.7