cordova-plugin-googlepay-button 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
@@ -11,7 +11,7 @@ cordova plugin add cordova-plugin-googlepay-button
|
|
11
11
|
or for Cordova build service, e.g. [VoltBuilder](https://volt.build/), add the following to config.xml:
|
12
12
|
|
13
13
|
```
|
14
|
-
<plugin name="cordova-plugin-googlepay-button" source="npm" spec="0.0.
|
14
|
+
<plugin name="cordova-plugin-googlepay-button" source="npm" spec="0.0.5" />
|
15
15
|
```
|
16
16
|
|
17
17
|
## Usage
|
package/package.json
CHANGED
package/plugin.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
3
3
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
4
4
|
id="cordova-plugin-googlepay-button"
|
5
|
-
version="0.0.
|
5
|
+
version="0.0.5">
|
6
6
|
|
7
7
|
<name>Google Pay Button Plugin</name>
|
8
8
|
<description>Cordova plugin for Google Pay PayButton API integration</description>
|
@@ -15,8 +15,8 @@
|
|
15
15
|
|
16
16
|
<platform name="android">
|
17
17
|
<config-file target="res/xml/config.xml" parent="/*">
|
18
|
-
<feature name="
|
19
|
-
<param name="android-package" value="com.plugin.
|
18
|
+
<feature name="GooglePayButton">
|
19
|
+
<param name="android-package" value="com.plugin.googlepay.GooglePayButton" />
|
20
20
|
</feature>
|
21
21
|
</config-file>
|
22
22
|
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<framework src="src/android/build.gradle" custom="true" type="gradleReference" />
|
25
25
|
|
26
26
|
<!-- Source files -->
|
27
|
-
<source-file src="src/android/
|
27
|
+
<source-file src="src/android/GooglePayButton.java"
|
28
28
|
target-dir="src/com/plugin/googlepaybutton" />
|
29
29
|
</platform>
|
30
30
|
</plugin>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
package com.plugin.
|
1
|
+
package com.plugin.googlepay;
|
2
2
|
|
3
3
|
import org.apache.cordova.CordovaPlugin;
|
4
4
|
import org.apache.cordova.CallbackContext;
|
@@ -20,9 +20,9 @@ import com.google.android.gms.wallet.button.ButtonConstants;
|
|
20
20
|
import com.google.android.gms.wallet.button.ButtonOptions;
|
21
21
|
import com.google.android.gms.wallet.button.PayButton;
|
22
22
|
|
23
|
-
public class
|
23
|
+
public class GooglePayButton extends CordovaPlugin {
|
24
24
|
|
25
|
-
private static final String TAG = "
|
25
|
+
private static final String TAG = "GooglePayButton";
|
26
26
|
private PayButton payButton;
|
27
27
|
private CallbackContext callbackContext;
|
28
28
|
private CordovaWebView webView;
|
package/www/GooglePayButton.js
CHANGED
@@ -41,7 +41,7 @@ class GooglePayButton {
|
|
41
41
|
}
|
42
42
|
},
|
43
43
|
(error) => reject(error),
|
44
|
-
'
|
44
|
+
'GooglePayButton',
|
45
45
|
'createPayButton',
|
46
46
|
[options]
|
47
47
|
);
|
@@ -66,7 +66,7 @@ class GooglePayButton {
|
|
66
66
|
cordova.exec(
|
67
67
|
resolve,
|
68
68
|
reject,
|
69
|
-
'
|
69
|
+
'GooglePayButton',
|
70
70
|
'showPayButton',
|
71
71
|
[position]
|
72
72
|
);
|
@@ -86,7 +86,7 @@ class GooglePayButton {
|
|
86
86
|
cordova.exec(
|
87
87
|
resolve,
|
88
88
|
reject,
|
89
|
-
'
|
89
|
+
'GooglePayButton',
|
90
90
|
'hidePayButton',
|
91
91
|
[]
|
92
92
|
);
|
@@ -107,7 +107,7 @@ class GooglePayButton {
|
|
107
107
|
cordova.exec(
|
108
108
|
resolve,
|
109
109
|
reject,
|
110
|
-
'
|
110
|
+
'GooglePayButton',
|
111
111
|
'updatePayButton',
|
112
112
|
[options]
|
113
113
|
);
|