Register   Login
     
  Latest Posts  
Catcha doesnt seem to work
by chaloum on 3/20/2010 8:16 PM
RE: Recently created articles are not shown in list
by atriage on 3/20/2010 10:15 AM
RE: Recently created articles are not shown in list
by spirit on 3/20/2010 10:08 AM
RE: Introducing the most powerful News Slider for Ventrian News Articles
by jhoelz on 3/19/2010 9:29 PM
Rich Snippets for Review, Ratings etc!
by georgelew on 3/19/2010 7:49 PM
Recently created articles are not shown in list
by atriage on 3/19/2010 11:18 AM
RE: News Articles Tokens
by spirit on 3/19/2010 10:43 AM
Author post count and link in listing.item.html
by mattbunce on 3/19/2010 10:18 AM
RE: News Article Detail and Lightbox
by spirit on 3/19/2010 10:12 AM
RE: News Article Detail and Lightbox
by ray-isc on 3/19/2010 9:49 AM
  Forums  
Subject: Paypal payments fails
Prev Next
You are not authorized to post a reply.

Author Messages
Mariette KnapUser is Offline
Gold Membership
Ventrian Master
Ventrian Master
Posts:665


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?


Mariëtte Knap
Microsoft MVP
Test UserUser is Offline
Registered Users
Ventrian Super Newbie
Ventrian Super Newbie
Posts:14

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


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
Ventrian Master
Ventrian Master
Posts:665


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.


Mariëtte Knap
Microsoft MVP
Mariette KnapUser is Offline
Gold Membership
Ventrian Master
Ventrian Master
Posts:665


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


Mariëtte Knap
Microsoft MVP
Mariette KnapUser is Offline
Gold Membership
Ventrian Master
Ventrian Master
Posts:665


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


Mariëtte Knap
Microsoft MVP
Mariette KnapUser is Offline
Gold Membership
Ventrian Master
Ventrian Master
Posts:665


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


Mariëtte Knap
Microsoft MVP
Richard EdwardsUser is Offline
Registered Users
Ventrian Super Newbie
Ventrian Super Newbie
Posts:15

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

 


Richard Edwards
www.dnnstuff.com
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:17204


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
Ventrian Master
Ventrian Master
Posts:17204


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
Ventrian Master
Ventrian Master
Posts:17204


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
Ventrian Master
Ventrian Master
Posts:17204


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

Scott McCulloch
Site Administrator
Mariette KnapUser is Offline
Gold Membership
Ventrian Master
Ventrian Master
Posts:665


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.


Mariëtte Knap
Microsoft MVP
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:17204


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