Paypal Return Error - paypal

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',

Related

Facebook messenger returning error on valid message request

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

I have a strange issue with Paypal adaptive API

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.

Webtechnick CakePHP-Facebook-Plugin permissions not working

I'm using the Webtechnick CakePHP-Facebook-Plugin in order to log my users into my CakePHP application, I need to get their user_relationship, user_relationship_details, user_religion_politics and email.
Im using something kike this to invoke the login button
echo $this->Facebook->login(array('perms' => 'email,user_religion_politics,user_relationships,user_relationship_details', 'redirect' => array('controller' => 'users', 'action' => 'facebook'), 'label' => __('<span class="icon-facebook-sign"></span> Login with facebook',true),'id' => 'facebook_btn' ));
And also in facebook on "App details" in the "Configure App Center Permissions" section I'm adding the permissions too, but its not working, when a user login into the app facebook is still requesting the default perms (public profile, friends list and email).
I solved it, It seems that I was missing $options parameter on my init function.
So I changed the call in my default.ctp file
from
$this->Facebook->init();
to
$this->Facebook->init(array('perms' => 'email,user_religion_politics,user_relationships,user_relationship_details'));
I solved it, It seems that I was missing $options parameter on my init function.
So I changed the call in my default.ctp file
from
$this->Facebook->init();
to
$this->Facebook->init(array('perms' => 'email,user_religion_politics,user_relationships,user_relationship_details'));

Web app is in Users Facebook Apps section as approved but Facebook not returning verified==true

I am using Facebook PHP SDK. There are some Facebook users that can't register or login with my site.
$user_profile = $this->api('/me');
Everything is working for most Facebook users joining the site. But I have just created two new Facebook accounts to test this due to a user complaint and both new facebook accounts are not returning the $user_profile['verified'] data.
I get:
array (size=11)
'id' => string '10000501019xxxx' (length=15)
'name' => string 'Toby xxxx' (length=12)
'first_name' => string 'Toby' (length=4)
'last_name' => string 'xxxx' (length=7)
'link' => string 'http://www.facebook.com/toby.xxxx.90' (length=39)
'username' => string 'toby.xxxx.90' (length=15)
'gender' => string 'male' (length=4)
'email' => string 'xxxx99#gmail.com' (length=22)
'timezone' => int -6
'locale' => string 'en_US' (length=5)
'updated_time' => string '2013-01-08T00:38:06+0000' (length
The web application is in the facebook users Account Settings > Apps and shows as approved.
Even though everything is working up to the point where the application is registered in the Facebook user's apps, Facebook still is not returning the $user_profile['verified'] == true therefore the user can't finish the registration.
I tried a work around where the after the user checks their Facebook profile to see if the App is there and approved they can still register. But, when trying to return and login, the $user_profile = $this->api('/me'); still doesn't contain the $user_profile['verified'] == true.
I really don't know how many users are running into this. But like I said two new test Facebook accounts that have the web app approved still don't register as having verified the app.
I don't know what else to do since I am receiving registrations and logins. The users that can't have the web App in their Facebook Aps section. Just seems like Facebook is not returning the verified=true for some reason.
Any ideas?
I took out the test of if the user had verified the account and, of course, the user can register and login. I deleted the app from the user's Facebook account then went back to the app to login. Facebook dialog then requires the user to re-approve the app. Strange that some users' data will not return that they have verified the app.
Strange that some users' data will not return that they have verified the app.
I think you might have misunderstood the meaning of the verified field here.
This has nothing to do with the user authorizing your specific app!
Instead it means whether the user has verified their account with Facebook, i.e. confirmed their identity by mobile phone, credit card or some other means.

"getLoginStatusUrl()" from the Facebook PHP sdk not working properly?

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