cordova-plugin-googlepay-button 0.0.9 → 0.0.10

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.
Files changed (3) hide show
  1. package/README.md +29 -1
  2. package/package.json +1 -1
  3. package/plugin.xml +1 -2
package/README.md CHANGED
@@ -11,10 +11,38 @@ 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.9" />
14
+ <plugin name="cordova-plugin-googlepay-button" source="npm" spec="0.0.10" />
15
15
  ```
16
16
 
17
17
  ## Usage
18
18
 
19
19
  This plugin is in active development and has not yet been tested or used in a submission to Google. The version will be updated to 1.0.0 when it has been and is ready for public production use.
20
20
 
21
+ ```
22
+ cordova.plugins.GooglePayButton.showPayButton(
23
+ (result) => {
24
+ console.log('GooglePay button result:', result);
25
+ // The Java code sends "clicked" when the button is actually clicked
26
+ if (result === 'clicked') {
27
+ // Display pay sheet (see plugin cordova-plugin-apple-pay-google-pay-with-environment)
28
+ // cordova.plugins.ApplePayGooglePay.makePaymentRequest(...)
29
+ } else {
30
+ console.log('GooglePay button shown successfully');
31
+ }
32
+ },
33
+ (error) => {
34
+ console.error('Error showing Google Pay button:', error);
35
+ }
36
+ );
37
+ ```
38
+
39
+ ```
40
+ cordova.plugins.GooglePayButton.hidePayButton(
41
+ (result) => {
42
+ console.log('GooglePay button hidden:', result);
43
+ },
44
+ (error) => {
45
+ console.error('Error hiding Google Pay button:', error);
46
+ }
47
+ );
48
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-googlepay-button",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "Cordova plugin for implementing the Google PayButton API",
5
5
  "cordova": {
6
6
  "id": "cordova-plugin-googlepay-button",
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.9">
5
+ version="0.0.10">
6
6
 
7
7
  <name>Google Pay Button Plugin</name>
8
8
  <description>Cordova plugin for Google Pay PayButton API integration</description>
@@ -17,7 +17,6 @@
17
17
  <config-file target="res/xml/config.xml" parent="/*">
18
18
  <feature name="GooglePayButton">
19
19
  <param name="android-package" value="com.plugin.googlepaybutton.GooglePayButton" />
20
- <param name="onload" value="false" />
21
20
  </feature>
22
21
  </config-file>
23
22