Paypal API Live Credentials not working - paypal

I set developed my own site that sells items with a shopping cart. When items are selected, a call is made to paypal's api to create a payment request, then to complete the payment. Seems to work fine with sandbox mode, but with live setting I get the following response :
{ [Error: Response Status : 400]
response:
{ name: 'VALIDATION_ERROR',
details: [ [Object] ],
message: 'Invalid request - see details',
information_link: 'https://developer.paypal.com/docs/api/#VALIDATION_ERROR',
debug_id: 'f8dbb7c22fdf2',
httpStatusCode: 400 },
httpStatusCode: 400 }
I was wondering if someone out who has worked with paypal's api to give me some advice.
Thanks!

Related

Google Action sends response as "Sorry Something went wrong. Please try again later." in the Transaction flow

I am using the orders version 2 APIs of Physical transaction using Google Pay and using Stripe as the payment gateway.
While testing the app using Stripe test publishable I am able to make transactions successfully but when I use the Stripe Live publishable key to generate the chargeable token from Google, the assistant replies with "Something went wrong. Please try again later.". This is happening when I make the conv.ask(new TransactionDecision({})) call.
I get the same response using either of the keys when I disable the Sandbox in the action console simulator.
This response has no error attached with it so I am unable to figure out the cause.
Here is the code-
conv.ask(new TransactionDecision({
orderOptions: {
requestDeliveryAddress: false,
},
paymentOptions: {
googleProvidedOptions: {
prepaidCardDisallowed: false,
supportedCardNetworks: ['VISA', 'AMEX', 'MASTERCARD'],
tokenizationParameters: {
// Tokenization parameter data will be provided by
// a payment processor, like Stripe, Braintree, Vantiv, etc.
parameters: {
'gateway': 'stripe',
'stripe:version': '2019-05-16',
'stripe:publishableKey': process.env.CS_ENV === 'prod' ? process.env.STRIPE_LIVE_PUBLISHABLE_KEY : process.env.STRIPE_TEST_PUBLISHABLE_KEY
},
tokenizationType: 'PAYMENT_GATEWAY',
},
},
},
proposedOrder: order,
}));

Payments REST API generating invalid redirect urls

Yesterday we were able to create payments and get redirect urls that could be used to approve payments. However today the redirect urls that get returned all result in pages with the message "At this time, we are unable to process your request. Please return to and try another option."
We are also unable to GET previous payments that have not been approved/refunded. Instead we get
{
"name": "INVALID_RESOURCE_ID",
"message": "The requested resource ID was not found",
"information_link": "https://developer.paypal.com/docs/api/#INVALID_RESOURCE_ID",
"debug_id": "ade89339d6e00"
}
Additional debug ids include: d07f86c738cea,5c6da3bb0b6a.
There are allready several posts about this. All you can do is to wait until this issues is fixed by paypal. Fixing the url by yourself wont fix the problem.

paypal rest node sdk "This transaction is invalid"

I'm merchants using it payment api.
I had completed the sandbox sample.
It was confirmed that payment in the sandbox account.
But suddenly it is not working. Program code is not changed.
`"error : This transaction is invalid.
Please return to the recipient's website to complete your transaction using their regular checkout flow."`
A "sandbox" is not working.
But it works if i switch to "live".
I have to test more than 20 days in the same way.
Suddenly, should not I do not know why. :(
See the following (approval_url)
{ id: 'PAY-3YF970037H573622HK7QOABY',
intent: 'sale',
state: 'created',
payer: { payment_method: 'paypal' },
transactions:
[ { amount: [Object],
description: 'This is the payment description.',
custom: '1',
item_list: [Object],
related_resources: [] } ],
create_time: '2016-09-20T07:06:46Z',
links:
[ { href: 'htt ps://api.sandbox.paypal.com/v1/payments/payment/PAY-3YF970037H573622HK7QOABY',
rel: 'self',
method: 'GET' },
{ href: 'htt ps://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-8W611604UP656490X',
rel: 'approval_url',
method: 'REDIRECT' },
{ href: 'htt ps://api.sandbox.paypal.com/v1/payments/payment/PAY-3YF970037H573622HK7QOABY/execute',
rel: 'execute',
method: 'POST' } ],
httpStatusCode: 201 }
"approval_url" is not the sandbox
'execute' and 'self' are the sandbox
It has been changed point
Today error information has changed.
"error : This transaction has expired. Please return to the recipient's website to complete your transaction using their regular checkout flow."
The contents of approval_url is the same.
But it is forced to put a "sandbox" in approval_url.
paypal page(approval_url) is loaded.
This way did not work yesterday.
But it work today.
I sent e-mail to paypal echnical support.
paypal came the answer :
"
Hi
Based from the full logs, it seems that the buyer account that you used for this case is hitting a risk issue in attempting to pay for the payment.
I suggest for you to clear cookies and cache and then retry again using other sandbox account.
Thanks
"
However, it is now working fine.
So the correct answer can not be tested.
I think there is something wrong with "EC", I'm trying to follow de the REST API exmples and I get the same results...
Any one

PayPal Subscription Payment Issue

I currently am encountering the following response from PayPal when attempting to process a Subscription payment.
2 times out of 10, this is what we are experiencing when we try to execute a billing agreement:
err: Error: Response Status : 400
httpStatusCode: 400
message: "Response Status : 400"
response: Object
debug_id: "bdbdb346c2726"
httpStatusCode: 400
information_link: "https://developer.paypal.com/webapps/developer/docs/api/#INVALID_TOKEN"
message: "The token is invalid"
name: "INVALID_TOKEN"
__ proto__: Object
stack: undefined
__ proto__: Error
result: null
this: global
Any help in troubleshooting the issue would be greatly appreciated. Has anyone encountered a similar issue?
Based on PayPal's log, the error message is EXECUTE_AGREEMENT_BUYER_NOT_ACCEPTED, It looks like buyer didn't accept this agreement, so you can't create billing agreement based on the token.

PayPal REST API 500 internal service error only in live

I am using the Paypal PHP REST API SDK, but I can reproduce the problem using curl too. I am able to get a token without a problem. This only occurs when I'm submitting a live payment. I can switch to sandbox and submit an identical payment successfully.
As you can see below this is a very basic payment. I don't see how there could possibly be a problem with the information being submitted.
I have no shortage of debug IDs since this happens every time, but here is the last one I got: 049eee254433f
{
"intent":"sale",
"payer":{
"payment_method":"credit_card",
"funding_instruments":[
{
"credit_card":{
"type":"visa",
"number":"(removed)",
"cvv2":"(removed)",
"expire_month":"1",
"expire_year":"2016",
"first_name":"(removed)",
"last_name":"(removed)"
}
}
]
},
"transactions":[
{
"amount":{
"total":"11.98",
"currency":"USD"
}
}
]
}
The issue, according to the debug ID, is that you are not sending the billing address along with the card information. The option to include/not include the billing address with your request is based upon your merchant account setup. In order to rectify the above error, please provide the billing address in your request.
https://developer.paypal.com/webapps/developer/docs/api/#creditcard-object