I have a strange problem with paypal
I'm trying to use Paypal adaptive API payment but is doing a strange problem
the status of de APPID is Approved Automatically.
Parameters say at once that there is a mistake and pay key created that works.
PAYPAL RETURN PARAMETERS:
[Ack] => Failure
[ErrorID] => 550001
[Message] => User is not allowed to perform this action
[Parameter] => EmailMarketing
[Severity] => Error
[Subdomain] => Application
AND
[PayKey] => GOOD-WORKING-PAY-KEY
[PaymentExecStatus] => CREATED
[RedirectURL] => RedirectURL
I tested de RedirectURL and works
If i put the RedirectURL directly in browser it works and creates the paypal form to pay
I do not know what to do to solve the error ?¿???¿?
Thanks in advance.
DELETED SECOND EDITION NOT NEEDED FOR RESPONSE
For such "User is not allowed to perform this action" error message, it usually due to APP id is not fully approved. I strongly suggest you to open a ticket at http://www.paypal-techsupport.com/, ask PayPal to check your APP Id status , make sure it's fully approved.
I found the Answer ^_^
I do not know why exactly, but with this parameters in request :
EmailHeaderImageURL = NULL
EmailMarketingImageURL = NULL
is working
1) maybe is caracter not allowed in the name of the url
2) maybe not correctly configured in paypal in some place
i will continue searching
this error is indicated in paypal with
[Ack] => Failure
[ErrorID] => 550001
[Message] => User is not allowed to perform this action
[Parameter] => EmailMarketing
And is odd but creates a working PAY KEY , maybe paypal "thinks" that this error is not too bad for not create the PAY KEY or maybe a paypal error.
Related
I have to integrate PayPal payments in Flutter and the only plugin that seems to have this kind of functionality is flutter_braintree. But the documentation there is not so detailed, so I am kind of confused how to use this plugin to have real payments. My mission is to have this kind of flow: click on a PayPal button in the app and then proceed with PayPal paying to a predefined IBAN. I tried to examine the PayPal and Braintree documentations, but since there is nothing mentioned for Flutter, I am a little bit confused.
Please help me what's the right direction to go in order to fulfil my requirements. I have the following questions:
How to use this plugin and make real payments? What do I need - a client token as far as I see, but I am going to generate this in Flutter?
Where should I put the IBAN that I want the money to be transferred to?
Am I supposed to use some kind of webviews for the PayPal, or this plugin is enough?
Thank you in advance, I am really stuck on this topic and can't find a solution.
Generate clientToken in php | nodejs see: https://developers.braintreepayments.com/reference/request/client-token/generate/php
$clientToken = $gateway->clientToken()->generate([
"customerId" => '21534539348326'//create customer in panel
]);`
Generate paymentNonce in app flutter:
BraintreePayment braintreePayment = new BraintreePayment();
var data = await braintreePayment.showDropIn(
nonce: clientNonce,
amount: "2.0",
inSandbox: true,
);
print("Response of the payment $data");
// exe: Generate transaction in php | nodejs see: https://github.com/braintree/braintree_php
$result = $gateway->transaction()->sale([
'amount' => '1000.00',
'paymentMethodNonce' => 'nonceFromTheClient',
'options' => [ 'submitForSettlement' => true ]
]);
currently all bots developed by me (including several production bots which have been in use for a while) stopped replying to messages. According to logs, Messenger is returning the following response:
(
[error] => Array
(
[message] => An active access token must be used to query information about the current user.
[type] => OAuthException
[code] => 2500
[fbtrace_id] => C9ExJBwjvfp
)
)
This is deeply frusturating, because the bots have been working well and the issue appeared in deployed bots which have been working independently for a while.
The request is as follows:
(
[recipient] => Array
(
[id] => 1783672501695199
)
[message] => Array
(
[text] => MESSAGE_TEXT
)
[tag] =>
[notification_type] => REGULAR
[messaging_type] => RESPONSE
[access_token] => XXXXXXXX
)
Is there a known bug or a backwards incompatible change in API? Had anyone encountered this issue?
This usually happens when the user who authorised a Facebook Page for given Facebook App revokes the token. This is generally possible from Facebook settings page (see Apps or Business Integrations).
You can fix it by re-authorisation of your Page in developer's portal (select your Facebook App, navigate to Settings and scroll to "Token Generation" section). If you don't have the Facebook App than you have to do it in the app of your bot provider.
Notice that there is an ongoing procedure of all Facebook App required to be approved again. But the final deadline is the 1st of August. So this should not be the case.
For me the problem was the PHP library I was using that sent the data to FB API by encoding with query string. As soon as I changed that with json_encode the problem was fixed. Hope that helps anyone.
It was actually a bug and it was fixed
While i am trying to payment through paypal using dodirect payment api,its gives me following response :
[TIMESTAMP] => 2018-01-17T10:31:55Z
[CORRELATIONID] => cc202be065d4f
[ACK] => Failure
[VERSION] => 57.0
[BUILD] => 39206242
[L_ERRORCODE0] => 10002
[L_SHORTMESSAGE0] => Security error
[L_LONGMESSAGE0] => Security header is not valid
[L_SEVERITYCODE0] => Error
I am using Live credentials and its working fine in sandbox account.
Please make sure you correctly enter the API user name, API password and API signature of your Live PayPal account instead of your Sandbox PayPal account.
In addition, when you copy and paste API credentials, please make sure that there is no blank spaces before or after where you have highlighted to copy the text. You can firstly paste the information into a text editing program such as Notepad or TextEdit to ensure that there are no extra spaces.
Furthermore, please also double check that you have not wrongly set the Endpoint to Sandbox mode as follows. Instead, "sandbox" should be removed and the Endpoint of PayPal Live site is 'https://api-3t.paypal.com/nvp' without "sandbox"
'api_endpoint' => 'https://api-3t.sandbox.paypal.com/nvp',
'api_username' => 'example_api1.email.com',
'api_password' => 'your_password',
'api_signature' => 'your_signature',
I have fully integrated my website with paypal using paypal RESTful's API PHP SDK. Now my problem is every once in a while on the payment process, once the user approves the payment and it comes back to my website for execution, the API execution request comes back with the following responses from paypal. The HTTP response code's in these scenarios are 400 and 500. Below I have listed the error name and error message which comes as a part of the JSON response I get form paypal on execute action (https://api.paypal.com/v1/payments/payment/PAY-xxxxxxxxxxxxxxxxxxxxxxxxxx/execute):
400 PAYMENT_NOT_APPROVED_FOR_EXECUTION,Payer has not approved payment
500 INTERNAL_SERVICE_ERROR,An internal service error has occurred
In terms of the code I use to make that call I have added the function which executes the payment. I should add that this is working in 98% of times. Below is the code:
public function getExecute()
{
// Payment is cancelled
if (!(Input::get('success') && Input::get('success') == 'true'))
return $this->runPaymentExitProcess();
// No paymentId
if (!Session::has('paymentId'))
return "No payment id to execute";
$paymentId = Session::get('paymentId');
$this->payment = Payment::get($paymentId, $this->apiContext);
// The payer_id is added to the request query parameters when the user is redirected from paypal back to your site
$this->execution->setPayer_id(Input::get('PayerID'));
$response = $this->payment->execute($this->execution, $this->apiContext);
// Check for paypal errors
if (isset($response->name)) {
// When we have a paypal error
if ($this->hasPaypalError($response)) {
$error = array('name' => $response->name, 'message' => $response->message);
Session::put('error', $error);
return (MODE == 'LIVE') ? Redirect::to('/paypalerror') : Redirect::to('/paypalerror'.MODE_PARAM);
die;
}
}
// Unset session
Session::forget('paymentId');
// execution successful
if ($this->addPaymentIdToUser($paymentId))
return (MODE == 'LIVE') ? Redirect::to('/') : Redirect::to('/'.MODE_PARAM);
}
The code is in laravel. Please note that the $this->apiContext is set in the constructor of the class. Also this is the function is the success url which is set in the API under redirect_urls.
Can someone please help me figure out if this issue is coming from my side or Paypal's side?
For the 400 error, this would occur if the user decided not to approve the payment. If you think the payment was actually approved in the web flow then that would be an issue to look into further.
Can you provide the debugId and approximate time (with timezone, or GMT) of a 500 internal server error response, and a 400 if you believe the payment was actually approved by user.
I am trying to determine whether a user is logged into Facebook or not. In the case that I am working with I would like to force him to log into my site even if he is logged into facebook already and has previously given me permissions.
$params = array(
'ok_session' => 'http://localhost/fb_connect?ok_session=1',
'no_user' => 'http://localhost/fb_connect?no_user=1',
'no_session' => 'http://localhost/fb_connect?no_session=1',
);
$next_url = $facebook->getLoginStatusUrl($params);
I was trying to use the code above (per the instructions on http://developers.facebook.com/docs/reference/php/facebook-getLoginStatusUrl/) to determine what flow I need to guide my users through, but in the case when there is 'no_session' aka nobody is logged into Facebook, instead of getting the 'no_session' url specified by the $params, I get the message Application Error on the facebook "check login status page"
Any suggestions are welcome
You're correct, its broken:
http://developers.facebook.com/bugs/295348980494364