mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-22 09:49:35 +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) {
|
* constructor(private alipay: Alipay) {
|
||||||
*
|
*
|
||||||
* //alipayOrder is a string that has been generated and signed by the server side.
|
* //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 => {
|
* .then(result => {
|
||||||
* console.log(result); // Success
|
* 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.
|
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
pay(order: string): Promise<any> {
|
pay(order: string, success?: (res?: any) => void, error?: (err?: any) => void): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ export class PhotoLibrary extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
getLibrary(options?: GetLibraryOptions): Observable<LibraryItem[]> {
|
getLibrary(success?: (res?: any) => void, error?: (err?: any) => void, options?: GetLibraryOptions): Observable<LibraryItem[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user