#import mobile.connect/mobile.connect.h>
@property (strong, nonatomic) PWPaymentProvider *provider;
- (void)viewDidLoad { [super viewDidLoad]; // Initialize Provider self.provider = [PWPaymentProvider getProviderWithApplicationId: YOUR APPLICATION IDENTIFIER profileToken: YOUR PROFILE TOKEN]; } - (void)viewDidLoad { [super viewDidLoad]; // Initialize Provider self.provider = [PWPaymentProvider getProviderWithApplicationId: YOUR APPLICATION IDENTIFIER profileToken: YOUR PROFILE TOKEN]; }
private PWProviderBinder _binder; private static final String APPLICATIONIDENTIFIER = "YOUR APP ID"; private static final String PROFILETOKEN = "YOUR PROFILE TOKEN"; private ServiceConnection _serviceConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName name, IBinder service) { _binder = (PWProviderBinder) service; // we have a connection to the service try { _binder.initializeProvider(PWProviderMode.TEST, APPLICATIONIDENTIFIER, PROFILETOKEN); } catch (PWException ee) { // error initializing the provider ee.printStackTrace(); } } @Override public void onServiceDisconnected(ComponentName name) { _binder = null; } };