Is it possible to accept payment with PayPal API without "APIPassword"

618 views Asked by At

I have added PayPal Express Checkout & PayPal Recurring Payments in my website with PayPal API.

I have added PayPal API details in web.config file as below

<appSettings>
<add key="APIUsername" value="username_api1.sitename.com"/>
<add key="APIPassword" value="1234567890"/>
<add key="APISignature" value="AYNTWwVp7kXPvCitJdl4O9aXZuCpAekoTM41ULLqI6Pt0lCy0tNDh8--"/>
<add key="Host" value="www.sandbox.paypal.com"/>
<add key="CurrencyCode" value="USD"/>

C# Code

Namespaces Used -

using com.paypal.sdk.services;
using com.paypal.sdk.profiles;
using com.paypal.sdk.util;

I am using Name Value Pair Approach

C# Code

NVPCallerServices caller = new NVPCallerServices();
IAPIProfile profile = ProfileFactory.createSignatureAPIProfile();
profile.APIUsername = System.Configuration.ConfigurationManager.AppSettings["APIUsername"];
profile.APIPassword = System.Configuration.ConfigurationManager.AppSettings["APIPassword"];
profile.APISignature = System.Configuration.ConfigurationManager.AppSettings["APISignature"];
caller.APIProfile = profile;

As you can see I need Username, Password & Signature for accepting payments.

I need to know if It is possible to accept payments without knowing API Password field.

I am testing it, but it will be useful to know if anyone already knew this questions answer.

Remember I just want to accept payment.

Thanks.

2

There are 2 answers

4
Matt Cole On BEST ANSWER

You can't really decouple the password from the username and signature -- they're a set, and you generally have to provide all three whenever you make an API call.

However, you can do a limited amount by passing the Subject field instead of the API username, password, and signature. In this case, the subject would be the email address of your PayPal account. However, without the API username/password/signature, you're going to be limited to running just a few API calls -- SetExpressCheckout, GetExpressCheckoutDetails, DoExpressCheckoutPayment, and GetTransactionDetails. You're also going to be limited to running Sale transactions -- you can't run Authorizations, and you can't create recurring payments.

0
Drew Angell On

Any classic API calls you make are going to require a valid username, password, and signature (or certificate).