Hoang Aloevera Hoang Aloevera - 1 year ago 182
Objective-C Question

How to use initializeWithClientIdsForEnvironments in paypal?

I include paypal for my shopping IOS app. I have a function in appdelegate about paypal. But i don't know obviously about function:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[PayPalMobile initializeWithClientIdsForEnvironments:
@{PayPalEnvironmentProduction : @"YOUR_CLIENT_ID_FOR_PRODUCTION",
PayPalEnvironmentSandbox : @"YOUR_CLIENT_ID_FOR_SANDBOX"}];
return YES;

Please help me how to use:
. I appreciate for any support!

Answer Source

If you are using paypal Sandbox account then you have to set YOUR_CLIENT_ID_FOR_SANDBOX otherwise if you are using paypal Live account then you have to set YOUR_CLIENT_ID_FOR_PRODUCTION.

You need to follow the following steps to get client Id from paypal account:

Go to Paypal developer Site here https://developer.paypal.com/webapps/developer/applications/myapps (you must have Paypal account, of course)

Click on Create App on right side of page Choose name of your app and click Create App Now you can see and manage everything include client ID and secret.

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download