Button creation through Button Manager API ends with error 11945

KarelCemus
Contributor
Contributor

Hi,

 

I am facing the issue of getting the error 11945 (The button country and language code combination specified is invalid.) when creating a button through API. I described it in detail on StackOverflow but as I get no response, I try it here too.

 

To briefly sum it up (for details, please, see the original question on SO):

 

  • I try to create the ENCRYPTED button through Button Manager API, but creation of the HOSTED button fails too
  • Tracing the error down I ended up with the tutorial written by PayPal, which fails too
  • I am not able to break through this error to successfully create the button

Could anyone help me to resolve or narrow down this issue, please? It would be much appreciated.

Login to Me Too
17 REPLIES 17

KarelCemus
Contributor
Contributor

@MTS_Ciaran That's odd. Yes, I am using command curl in Linux exactly as I posted in the previous post.

 

As you were suggesting, I tried a different account. I created a new account with US as an origin and it worked! So I created another account in Czech (which I need because of our clients) and it didn't work again. I got stuck with the previous error.

 

TIMESTAMP=2017-07-04T12:50:41Z
CORRELATIONID=294ed0bd7d3cb
ACK=Failure
VERSION=51.0
BUILD=33063964
L_ERRORCODE0=11945
L_SHORTMESSAGE0=Invalid Data
L_LONGMESSAGE0=The button country and language code combination specified is invalid.
L_SEVERITYCODE0=Error

So obviously, this is related to that the account resides in Czech. Unfortunately, as it is "must have", what can I do with that? Do you have any thoughts, please?

Login to Me Too

MTS_Ciaran
Moderator
Moderator

OK got it, so what you can do is remove button country altoghether. Its not a required variable to be honest so unless you absolutely need it, pull it out completely. 

Login to Me Too

KarelCemus
Contributor
Contributor

@MTS_Ciaran Yes, that's what I thought and did as the first thing when I tried to implement it. However, it doesn't work. To be sure, I re-run in now:

 

Request

curl https://api-3t.sandbox.paypal.com/nvp \
  -d USER=<my-user> \
  -d PWD=<my-pass> \
  -d SIGNATURE=<my-secret> \
  -d VERSION=51.0 \
  -d METHOD=BMCreateButton \
  -d BUTTONCODE=ENCRYPTED \
  -d BUTTONTYPE=CART \
  -d BUTTONSUBTYPE=PRODUCTS \
  -d L_BUTTONVAR1=item_name%3Dshoehorn \
  -d L_BUTTONVAR2=amount%3D1464.46 \
  -d L_BUTTONVAR3=tax=%3D21 \
  -d L_BUTTONVAR4=item_number%3D123456

Response:

TIMESTAMP=2017-07-04T15:05:59Z
CORRELATIONID=d0c4c31e39082
ACK=Failure
VERSION=51.0
BUILD=33063964
L_ERRORCODE0=11945
L_SHORTMESSAGE0=Invalid Data
L_LONGMESSAGE0=The button country and language code combination specified is invalid.
L_SEVERITYCODE0=Error
Login to Me Too

MTS_Ciaran
Moderator
Moderator

OK, can you try this API call, set the <TODO> field to your merchant PayPal account. 

 

METHOD = BMCreateButton
VERSION = 109.0
BUTTONCODE = Hosted
BUTTONTYPE = buynow
L_BUTTONVAR0 = business=<TODO>
L_BUTTONVAR1 = item_name=ButtonCreatedWithNVP
L_BUTTONVAR2 = amount=1.00
L_BUTTONVAR3 = currency_code=USD
L_BUTTONVAR4 = no_note=1
BUTTONIMAGE = reg

Login to Me Too

KarelCemus
Contributor
Contributor

@MTS_Ciaran Thanks for your efforts, but still the same error. CORRELATIONID=470b270748a38

 

Note: With the US account it works, but not with the Czech

Login to Me Too

MTS_Ciaran
Moderator
Moderator

oh my goddddd 😞

 

ok Can you PM me over the sandbox accounts API credentials I want to reproduce this, if its the last thing I do. 

Login to Me Too
Solved

KarelCemus
Contributor
Contributor

For future reference, there is the issue resolution from PM by MTS_Ciaran:

 

Thanks, so this looks like a bug on the sandbox from what I can see. The issue is that the account is CZ and for some reason we're not allowing the button creation because of that. It doesnt look to be the same on the live environment so I would suggest using a US account for testing and once live the CZ account shouldn't be an issue. 

 

I'll work internally to get the sandbox corrected for this. 

Login to Me Too

CorvusGPS
New Community Member

While you are looking at it - seems to affect HU accounts as well in sandbox mode, while the very same request completes on live.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.