fix(alipay): add 'string' as an alternative type for 'pay()' input parameter; (#2172)

change 'installVariables' name to 'ALI_PID' for Alipay cordova plugin
This commit is contained in:
jing-zhou 2017-12-09 04:10:31 +08:00 committed by Ibby Hadeed
parent c038c6331c
commit d43fe72f7b

View File

@ -101,17 +101,17 @@ export interface AlipayOrder {
plugin: 'cordova-alipay-base', plugin: 'cordova-alipay-base',
pluginRef: 'Alipay.Base', pluginRef: 'Alipay.Base',
repo: 'https://github.com/xueron/cordova-alipay-base', repo: 'https://github.com/xueron/cordova-alipay-base',
install: 'ionic cordova plugin add cordova-alipay-base --variable APP_ID=your_app_id', install: 'ionic cordova plugin add cordova-alipay-base --variable ALI_PID=your_app_id',
installVariables: ['APP_ID'], installVariables: ['ALI_PID'],
platforms: ['Android', 'iOS'] platforms: ['Android', 'iOS']
}) })
@Injectable() @Injectable()
export class Alipay extends IonicNativePlugin { export class Alipay extends IonicNativePlugin {
/** /**
* Open Alipay to perform App pay * Open Alipay to perform App pay
* @param order { AlipayOrder } alipay options * @param order { AlipayOrder | string } alipay options
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error. * @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
*/ */
@Cordova() @Cordova()
pay(order: AlipayOrder): Promise<any> { return; } pay(order: AlipayOrder | string): Promise<any> { return; }
} }