phonegap/phonegap-iphone — Issue #315: PayPal MPL library broken in PhoneGap 1.1
Author: tifroz
Created: 2011-10-11 19:44:17+00:00
State: open

My Paypal MPL plugin for iOS worked fine with PhoneGap 0.9.6, but I can't get it to work with PhoneGap 1.1; **it fails with a whitelist rejection no matter what I have listed under PhoneGap.plist's ExternalHosts**.

With "*.paypal.com", and "mobileclient.sandbox.paypal.com" both whitelisted, I still get this error:
```ERROR whitelist rejection: url='https:/mobileclient.sandbox.paypal.com/GMAdapter/DeviceInterrogation'```

...notice the single forward-slash prefix in the logs, it's `https:/mobileclient...`, instead of the expected `https://mobileclient...` and there is a fat chance that this single slash is throwing off the witelist's url parser - although I can't tell if the PayPal library or PhoneGap doing something funky.

The problem should be reproducible by initializing PayPal from a plugin - the very first call to PayPal triggers the error:
```[PayPal initializeWithAppID:PAYPAL_APP_ID forEnvironment:PAYPAL_APP_ENV];```

As a side-note, I tested with both Paypal MPL 1.1 and 1.1.5