How to Verify Paypal Pro Signature in PHP? - paypal

I m working on a Web App and using Paypal Pro. I need to Verify if owner/admin have added valid Username, Password and API Signature in the configuration Settings so that owner/admin cannot put invalid credentials.Is there any way to do this?

Related

PayPal Assisted Account Creation invalid client_id or redirect_uri

I followed this doc to Set up Assisted paypal Accounts.
And create sample page with sandbox client id and merchant id as follows.
When clicked rendered button I get following error page. I checked popup url and found redirect
redirect_uri=https://www.sandbox.paypal.com/conex/ac/add-offer-recipient
But in my app settings I have setup different urls for rediection
In the prerequistics for AAC in that doc, it says "Contact your PayPal account manager to enable identity services."
If you don't have a PayPal account manager who's guiding you with this integration and enabling the necesary service for you, then you can't use this and should not be trying to follow this doc.
To me it worked after setting return URL as follows
https://www.sandbox.paypal.com/conex/ac/add-offer-recipient

Paypal integration - Relying Party Validation error: redirect_uri provided in the request does not

Trying to get login with PayPal into prestashop, all seem to be done corectly accorting to installation guide but getting this error:
Relying Party Validation error: redirect_uri provided in the request
does not match with the registered redirect_uri. Please check the
request.
What is the problem?
There are two modes for any application on Paypal developers website (i.e. Live and Sandbox mode), please confirm that you are using the same API data that you have configured.
Yes, taking all data from live mode of the app.

Unable to test methods in API Explorer - Security Header in not valid - 10002 error

I logged into Paypal and created an Api user.
I now have an API signature, API username and API password.
When I go to https://devtools-paypal.com/apiexplorer/PayPalAPIs API Explorer and enter my username, password and signature into the API cridentials field, I always get a "Security header is not valid - 10002" error.
The request body looks correct. There are no spaces in my credentials and all the values are correct.
If I leave the default Paypal credentials in the API Credentials fields, the transactionSearch method works as expected.
How can I test this method in the API Explorer?
I think that page can only call the Sandbox endpoint. Are you using Sandbox credentials or Live credentials?

Are PayPal username, password and signature secure and private?

I'm developing web-service, where one users (companies) can receive payments directly from another (company's customers). Currently company need to enter its PayPal username, password and signature to receive payments via express checkout api. Is it normal, that users (companies in my case) will enter their PayPal credentials on remote site or it's secure information? I can't find any information about it. But i found, that some services work in the same way:
http://www.getharvest.com/help/invoices-and-estimates/online-payment-and-gateways/paypal-website-payments-pro
http://support.getresponse.com/faq/how-find-api-login-data-paypal
help.wildapricot.com/display/DOC/PayPal+Payments+Pro
Also i found another way for receiving direct payments - generate button (on the PayPal site or manually), where you need only PayPal email of seller. What the differences between these methods, its advantages and disadvantages?
Yes, they are considered private. Since it grants you access to all API operations, it can also be used to empty your PayPal account.
What I would recommend instead of collecting API credentials, is to use 'third-party permissions'.
This means initially requesting permission from the account holder via a pop-up dialog. Once granted, you'll receive an access token. This access token can then be included in the HTTP header of your API calls to make calls on behalf of the customer.
Your users can either manually grant permissions to you (they'll need to log into their PayPal account and navigate to the right section within their Profile), or, if you want to make it easier, you can implement the 'Permissions API'.
I would suggest taking a look at https://developer.paypal.com/webapps/developer/docs/classic/products/permissions/ for more information.
To get started, sign up for an 'application' with PayPal via https://apps.paypal.com/.
Ensure you request access to the Permissions Service and receive an Application ID.
This will be the AppID for the Live environment. For Sandbox, you can use APP-80W284485P519543T.

configuring paypal gateway fields in spree

I am trying to add the paypal gateway to spree, but am a bit confused what the different fields mean: server, login, password, signature. are login/password supposed to be those that i use to login to paypal? what about server and signature?
Found some info here:
http://guides.spreecommerce.com/payment_gateways.html
server can either be "test" or "live". Not sure why they have this here (as well as a tickbox) but thats the rule anyway!
The signature you get from paypal, as an API signature. If your using developer.paypal.com its pretty easy to get one. After logging in just click "API Credentials" on the left.