Unable to convert currency paypal pay API error - api

I am using paypal adaptive payment API.
https://svcs.sandbox.paypal.com/AdaptivePayments/Pay
Request payload
{
"actionType":"PAY",
"memo":"Example",
"preapprovalKey":"PA-4PV844316B104562R",
"receiverList":{"receiver":{"amount":"14.00","email":"reveiver.email#gmail.com"}},
"currencyCode":"CHF",
"requestEnvelope":{"errorLanguage":"en_US"},
"pinType":"NOT_REQUIRED",
"feesPayer": "SENDER",
"senderEmail":"sender.email#gmail.com",
"returnUrl":"http://www.google.com/?paypal=ok",
"cancelUrl":"http://www.google.com/paypal=cancel",
"clientDetails": {
"applicationId": "APP-80W284485P789543T"
}
}
Getting response
{
"responseEnvelope": {
"timestamp": "2018-11-05T20:45:14.602-08:00",
"ack": "Failure",
"correlationId": "1609b946b9c72",
"build": "50069244"
},
"error": [
{
"errorId": "520002",
"domain": "PLATFORM",
"subdomain": "Application",
"severity": "Error",
"category": "Application",
"message": "Internal Error",
"parameter": [
"Unable to convert currency"
]
}
]
}
If I send currencyCode:"USD" then it work fine But when i pass currencyCode:"CHF" Then it gives error in response. My all sandbox account currency is CHF. Till 26th Oct it's working but suddenly gives error when i check on 3rd Nov.

Base on my debugging, it happens when you have more than one receiver, currency is not USD and reverseAllParallelPaymentsOnError is set to true.
When reverseAllParallelPaymentsOnError is set to false, the transaction is pushing through.
Not a solution though, I'm still checking for other solution.

Related

how can I manage custom errors coming from the server?

I use Jhipster with react as frontend with loopback as server side, I should show custom error ( ex. tax code already present in the archive).
this is format error
{
"error": {
"statusCode": 422,
"name": "UnprocessableEntityError",
"message": "The request body is invalid. See error object `details` property for more info.",
"code": "VALIDATION_FAILED",
"details": [
{
"path": "partitaIva",
"message": "Partita Iva giĆ  presente",
"code": "CUSTOM_ERROR",
"info": {}
}
]
}
}
There could be more errors too, like for a form.
I want to know how to display the error returned by server.

Get more than 100 tweets Postman/Twitter API v2

I'm using Postman and Twitter API v2 together, to pull data for a paper. I've loaded the "Get more than 100 tweets" library, but it's pagination doesn't seem to be working.
I keep getting this error (listed below, in bold):
"errors": [
{
"parameters": {
"pagination_token": [
"b26v89c19zqg8o3fpz8mukx3mf6m7ag90u7sjx2xy61kt"
],
"next_token": [
"1"
]
},
**"message": "At most one of [pagination_token, next_token] can be provided."**
}
],
"title": "Invalid Request",
"detail": "One or more parameters to your request was invalid.",

Sabre Instaflights Search One-way getting no results

I am facing an issue in calling Sabre Instaflights Search API Below are the two issues which I am facing.
No results if I send only departure date. https://api-crt.cert.havail.sabre.com/v1/shop/flights?origin=JFK&destination=LAX&departuredate=2019-01-30&onlineitinerariesonly=N&limit=10&offset=1&eticketsonly=N&sortby=totalfare&order=asc&sortby2=departuretime&order2=asc&pointofsalecountry=US
Below is the error response which i am getting.
{
"status": "Complete",
"reportingSystem": "RAF",
"timeStamp": "2019-01-22T13:33:45+00:00",
"type": "Application",
"errorCode": "WARN.RAF.APPLICATION",
"instance": "raf-darhlc005.sabre.com-8080",
"message": "No results were found"
}
Getting Date range error if the return date above 20 days https://api-crt.cert.havail.sabre.com/v1/shop/flights?origin=JFK&destination=LAX&departuredate=2019-01-30&returndate=2019-02-20&onlineitinerariesonly=N&limit=10&offset=1&eticketsonly=N&sortby=totalfare&order=asc&sortby2=departuretime&order2=asc&pointofsalecountry=US
Below is the error which I am getting.
{
"status": "NotProcessed",
"reportingSystem": "RAF",
"timeStamp": "2019-01-22T13:43:26+00:00",
"type": "Validation",
"errorCode": "ERR.RAF.VALIDATION",
"instance": "raf-darhlc006.sabre.com-9080",
"message": "Date range in 'departuredate' and 'returndate' exceeds the maximum allowed"
}
Please tell me how can fix these errors??

Google API Gmail error 500 Internal error encountered

I try send request https://gmail.googleapis.com/gmail/v1/users/me/messages/ using Postman, but I get:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"errors": [
{
"message": "Internal error encountered.",
"domain": "global",
"reason": "backendError"
}
],
"status": "INTERNAL"
}
}
Could somebody help me with this issue?
Please use this tool[1] to check your domain, most likely there are some critical problems detected within this domain. Mail-flow is probably affected.
Also check this documentation[2] on domain nameservers.
[1]https://toolbox.googleapps.com/apps/checkmx/
[2]https://support.google.com/a/answer/2573637#H

UDFs with the php api library

I am trying to add a UDF (I've tried both options of inline vs on cloud storage) and always get the same messsage:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalidQuery",
"message": "Unknown TVF: funcName",
"locationType": "other",
"location": "query"
}
],
"code": 400,
"message": "Unknown TVF: funcName"
}
}
I set the resource via.
$udf_resource = new Google_Service_Bigquery_UserDefinedFunctionResource();
$udf_resource->setResourceUri('gs://path/to/bucket/funcName.js');
or
$udf_resource = new Google_Service_Bigquery_UserDefinedFunctionResource();
$udf_resource->setInlineCode("FUNC_NAME_CODE");
both are being inserted into a job query config via.
$query_config->setUserDefinedFunctionResources($udf_resource);
The udf runs fine via. the Web UI.
Is there something I am missing?
passing array to setUserDefinedFunctionResources(), e.g.
$query_config->setUserDefinedFunctionResources([$udf_resource]);