mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 08:43:01 +08:00
fix(alipay): adjust pay function properties (#3197)
* fix bug 'Success is not a function #158' https://github.com/terikon/cordova-plugin-photo-library/issues/158 * alipay: add optional success, error callback for pay() method
This commit is contained in:
parent
7033a1822e
commit
fb5d47bff2
@ -15,7 +15,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* constructor(private alipay: Alipay) {
|
||||
*
|
||||
* //alipayOrder is a string that has been generated and signed by the server side.
|
||||
* this.alipay.pay(alipayOrder)
|
||||
* this.alipay.pay(alipayOrder, success, error)
|
||||
* .then(result => {
|
||||
* console.log(result); // Success
|
||||
* })
|
||||
@ -44,7 +44,7 @@ export class Alipay extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
|
||||
*/
|
||||
@Cordova()
|
||||
pay(order: string): Promise<any> {
|
||||
pay(order: string, success?: (res?: any) => void, error?: (err?: any) => void): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ export class PhotoLibrary extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
getLibrary(options?: GetLibraryOptions): Observable<LibraryItem[]> {
|
||||
getLibrary(success?: (res?: any) => void, error?: (err?: any) => void, options?: GetLibraryOptions): Observable<LibraryItem[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user