Reputation: 9131
I'm requesting out of a node application via the nodejs sdk:
paypal.payment.create({ ... }, function (err, transaction) {
fn(err, transaction);
});
The shipping_address
payload looks like this:
{
recipient_name : 'Max Mustermann',
line1 : 'Neue Schönhauser Str 18', // the 'ö' causes error
line2 : 'Vorderhaus, links',
city : 'Berlin',
country_code : 'DE',
postal_code : '10178',
state : 'BE',
type : 'residential'
}
The utf-8 character in line1
key's value causes a MALFORMED_REQUEST
error. If I replace it by oe
everything works fine.
Does paypal's REST api understand utf-8?
Do I have to setup the character encoding somewhere?
Thx
Upvotes: 0
Views: 210
Reputation: 902
Issue was due to incorrect Content-Length getting set from the nodejs sdk and not the API. We have fixed the SDK and published the latest version to npm. Please use 0.6.4 version which has the fix for the same. Thanks for reporting.
Upvotes: 1
Reputation: 19356
It should accept this, yes, of course. Let me check this for you as it shouldn't throw an error on that.
Upvotes: 0