Error, Fault message used AP ID: APP-80W284485P519543T - paypal

ERROR
Array
(
[0] => Array
(
[name] => ns3:FaultMessage
[attributes] => Array
(
[xmlns:ns3] => http://svcs.paypal.com/types/common
[xmlns:ns2] => http://svcs.paypal.com/types/ap
)
[0] => Array
(
[name] => responseEnvelope
[0] => Array
(
[name] => timestamp
[value] => 2014-02-20T10:17:27.045-08:00
)
[1] => Array
(
[name] => ack
[value] => Failure
)
[2] => Array
(
[name] => correlationId
[value] => 53cf284d0847f
)
[3] => Array
(
[name] => build
[value] => 9641252
)
)
[1] => Array
(
[name] => error
[0] => Array
(
[name] => errorId
[value] => 560022
)
[1] => Array
(
[name] => domain
[value] => PLATFORM
)
[2] => Array
(
[name] => subdomain
[value] => Application
)
[3] => Array
(
[name] => severity
[value] => Error
)
[4] => Array
(
[name] => category
[value] => Application
)
[5] => Array
(
[name] => message
[value] => The X-PAYPAL-APPLICATION-ID header contains an invalid value
)
[6] => Array
(
[name] => parameter
[value] => X-PAYPAL-APPLICATION-ID
)
)
)
)
Hello,
I use the sandbox AP ID: APP-80W284485P519543T and I tried another one which called Client ID, which i got from the API credentials in the profile under sandbox test accounts, both didn't work and I got this error. What is the right api ID? Where can I find it? or is some other thing wrong? Looking forward for your answer. Thank you.
Regards
Jess

The APP ID : APP-80W284485P519543T is the default APP ID for the Sandbox.
But, you are making calls to live PayPAl.
The Endpoint should be something like : https://svcs.sandbox.paypal.com/AdaptivePayments/Pay
Also, check the if you have passed any space in your APPID.
Client ID is used for making REST API calls.

The sandbox App ID is indeed APP-80W284485P519543T, so you're good if that's the value you're using for testing. I guess you just need to make sure you're trimming any whitespace or any junk off the ends, and make sure your headers are setup correctly in general.
Are you working with PHP? If so, you might want to check out my PayPal class library. It'll make your Adaptive Payments calls very simple for you.

Related

SendGrid response status code 0 no further information

I am trying to send a mail using the SendGrid PHP API library. It worked when I tried it yesterday but today the reponse just has zero information:
SendGrid\Response Object
(
[statusCode:protected] => 0
[body:protected] =>
[headers:protected] => Array
(
[0] =>
)
)
The following object is being used in the \SendGrid\SendGrid()->send() method:
SendGrid\Mail\Mail Object
(
[from:SendGrid\Mail\Mail:private] => SendGrid\Mail\From Object
(
[name:SendGrid\Mail\EmailAddress:private] => test1
[email:SendGrid\Mail\EmailAddress:private] => test#example.com
[substitutions:SendGrid\Mail\EmailAddress:private] =>
[subject:SendGrid\Mail\EmailAddress:private] =>
)
[subject:SendGrid\Mail\Mail:private] => SendGrid\Mail\Subject Object
(
[subject:SendGrid\Mail\Subject:private] => this is a test
)
[contents:SendGrid\Mail\Mail:private] => Array
(
[0] => SendGrid\Mail\Content Object
(
[type:SendGrid\Mail\Content:private] => text/html
[value:SendGrid\Mail\Content:private] =>
<h1>sending mails</h1>
)
)
[attachments:SendGrid\Mail\Mail:private] =>
[reply_to:SendGrid\Mail\Mail:private] =>
[personalization:SendGrid\Mail\Mail:private] => Array
(
[0] => SendGrid\Mail\Personalization Object
(
[tos:SendGrid\Mail\Personalization:private] => Array
(
[0] => SendGrid\Mail\To Object
(
[name:SendGrid\Mail\EmailAddress:private] => mr test
[email:SendGrid\Mail\EmailAddress:private] => testtest#example.com
[substitutions:SendGrid\Mail\EmailAddress:private] =>
[subject:SendGrid\Mail\EmailAddress:private] =>
)
)
[ccs:SendGrid\Mail\Personalization:private] => Array
(
[0] => SendGrid\Mail\Cc Object
(
[name:SendGrid\Mail\EmailAddress:private] =>
[email:SendGrid\Mail\EmailAddress:private] => testtest1#example.com
[substitutions:SendGrid\Mail\EmailAddress:private] =>
[subject:SendGrid\Mail\EmailAddress:private] =>
)
)
[bccs:SendGrid\Mail\Personalization:private] =>
[subject:SendGrid\Mail\Personalization:private] =>
)
)
)
Obviously I used correct addresses in the tos and ccs sections.
Is something wrong with the sent object?
Apart from the code if there are any other problems in sending mail the send-grid library remains silent without throwing any exceptions and just returns the response 0. I would suggest you to
visit this link
In php-http-client\lib create a folder Exception.
Copy lib/Exception/InvalidRequest.php into the folder.
Modify lib/Client.php
These modifications are to throw appropriate exceptions which will help you to find what could be the problem in your case and be able to take it further.

Pricerr theme and Paypal Chained Adaptive

I am seeking help setting up Paypal gateway for 2 simultaneous payments, 15% to website owner & 85% to service seller.
I have set up a wordpres theme called Pricerr, published a product, and completed all the payment gateway details for Paypal. I believe that I have filled in ALL the fields on the PricerrTheme - Payment Methods form correctly.
For every purchase, I want the website to get 15% (into Paypal business account) of the fee and the service supplier to get 85%, simultaneously.
I believe this means the payment must be adaptive.
When I set up the Payment gateway details as standard, the whole fee gets paid to the website. This transaction works as far as Paypal is concerned.
When I however make it an Adaptive payment, I get the below error, no matter what I do.
You can test the purchase if you like (I have one service that costs 50 cents, and I will repay anyone the 50 cents if they purchase the service while testing the gateway.
The error message is below.
Please help me fix the Paypal payment gateway. I want a simultaneous payment split in two, like below, if possible.
Buyer ===> 15% to website
===> 85% to seller
ERROR
Array
(
[0] => Array
(
[name] => ns3:FaultMessage
[attributes] => Array
(
[xmlns:ns3] => http://svcs.paypal.com/types/common
[xmlns:ns2] => http://svcs.paypal.com/types/ap
)
[0] => Array
(
[name] => responseEnvelope
[0] => Array
(
[name] => timestamp
[value] => 2015-09-04T17:13:04.118-07:00
)
[1] => Array
(
[name] => ack
[value] => Failure
)
[2] => Array
(
[name] => correlationId
[value] => d4103492da29a
)
[3] => Array
(
[name] => build
[value] => 17820627
)
)
[1] => Array
(
[name] => error
[0] => Array
(
[name] => errorId
[value] => 550001
)
[1] => Array
(
[name] => domain
[value] => PLATFORM
)
[2] => Array
(
[name] => subdomain
[value] => Application
)
[3] => Array
(
[name] => severity
[value] => Error
)
[4] => Array
(
[name] => category
[value] => Application
)
[5] => Array
(
[name] => message
[value] => User is not allowed to perform this action
)
)
)
)
It looks like you business account is not verified, please verify the account firstly, then try to call API again.
How to verify a PayPal account: https://www.paypal.com/us/webapps/helpcenter/helphub/article/?solutionId=FAQ444&m=HTQ

Fetching data from facebook using graph api

I can get desired data using facebook api like interest, movies etc. Which comes in below format.
Array
(
[data] => Array
(
[0] => Array
(
[category] => Movie
[name] => 3 Idiots Movie
[created_time] => 2012-05-11T13:22:34+0000
[id] => 441170255909978
)
[1] => Array
(
[category] => Movie
[name] => Harry Potter
[created_time] => 2011-04-11T05:44:14+0000
[id] => 156794164312
)
[2] => Array
(
[category] => Movie
[name] => Official Narnia: Voyage of the Dawn Treader
[created_time] => 2011-03-10T18:26:57+0000
[id] => 190647217857
)
[3] => Array
(
[category] => Movie general
[name] => Harry Porter
[created_time] => 2011-03-10T18:26:57+0000
[id] => 360697777345
)
How can I get details whic gives only movies and ID so that I can store in database?
You can do something of the following form:
foreach (Array['data'] as $var)
{
$ID=$var['id'];
$Name=$var['name'];
}
Note: In Array['data'], Array will be the name of the variable that you are saving this data in.

How to get the visitors state information from the tab iframe tab page via signed request?

Is there anyway to get the state information of the user visiting my facebook tab page? Currently via signed request i can get the country information. Is there a way to get state information also??
Answer is NO, check out the documentation here https://developers.facebook.com/docs/authentication/signed_request/
You get data like this
Array (
[algorithm] => HMAC-SHA256
[issued_at] => 1328803958
[page] => Array (
[id] => 114951721840
[liked] => 1
[admin] => 1 )
[user] => Array (
[country] => us
[locale] => en_US
[age] => Array ( [min] => 21 )
)
)

How to get "message" and "photo" from status message in group

Among other API's (Twitter), I am using the Facebook Graph API to create a realtime "collage" of photo's and messages from Facebook, Twitter and a designated mailbox, so that all guests at a wedding can send in photos and messages, that will be projected using a beamer during the wedding.
I have successfully implemented retrieval of type="message" and type="photo" messages, but when it comes to fetching messages of type="status", the messages are missing the "message" property. Also, if a status was posted with a photo, I cannot find any way to retrieve the photo that was attached to the status message.
Is there any way (either via Graph or by using FQL), to get the "missing" information? The status messages in the group itself (viewing the group using Facebook) contain the text and the photo, so I believe the information should be available somewhere.
The details of the message that I get, look as follows:
(I have changed or deleted some of the properties for privacy reasons).
As you can see, there is no [message] property containing the text of the status update, nor is there any reference to the photo that accompanies this status update.
Array (
[id] => xxxxxxxxxxxxxxx_xxxxxxxxxxxxxxx
[from] => Array
(
[name] => <name>
[id] => xxxxxxxxxxxxxxx
)
[to] => Array
(
[data] => Array
(
[0] => Array
(
[version] => 1
[name] => <name>
[id] => xxxxxxxxxxxxxxx
)
)
)
[actions] => Array
(
[0] => Array
(
[name] => Comment
[link] => http://www.facebook.com/xxxxxxxxxxxxxxx/posts/xxxxxxxxxxxxxxx
)
[1] => Array
(
[name] => Like
[link] => http://www.facebook.com/xxxxxxxxxxxxxxx/posts/xxxxxxxxxxxxxxx
)
)
[type] => status
[application] => Array
(
[name] => Facebook for iPhone
[namespace] => fbtouch
[id] => xxxxxxxxxx
)
[created_time] => 2012-05-26T16:00:00+0000
[updated_time] => 2012-05-26T16:00:00+0000
[likes] => Array
(
[data] => Array
(
[0] => Array
(
[name] => <name>
[id] => xxxxxxxxxxxxxx
)
)
[count] => 1
)
[comments] => Array
(
[count] => 0
)
)
I hope there is a way to retrieve the properties I need; it would be a shame if all photos that are posted as "status" message, cannot be used for the wedding presentation.