Install the Cordova Buy plugin and use it using the Google Play Developer Console

I use Purchase Cordova Plugins in my Cordoba project. I tried installing it using Cordova CLI 5.1 and now 6.0.0. I added my payment key from the developer console in two places to check if it works. Added it to fetch.json as a variable

"cc.fovea.cordova.purchase": {
    "source": {
        "type": "git",
        "url": "https://github.com/j3k0/cordova-plugin-purchase.git",
        "subdir": "."
    },
    "is_top_level": true,
  "variables": {
    "BILLING_KEY": "MY_KEY"
  }

and config.xml

 <plugin name="cc.fovea.cordova.purchase" version="4.0.0" src="https://github.com/j3k0/cordova-plugin-purchase.git">
<param name="BILLING_KEY" value="MY_KEY" />

Also, in my AndroidManifest.xml, I added:

<uses-permission android:name="com.android.vending.BILLING" />

, , APK . , , "", " ", : " , BILLING APK."

, , - . , ?

: Visual Studio Tools Apache Cordova 6 . , , ....

+4
2

, . , Windows. , , . , , , . github Alex blog .

Cordova InAppPurchase

Alex Disler

6/10

, Visual Studio Apache Cordova 10 , , ... . , , . , , , , CLI 6.2.0

Apache Cordova Release 10

+1

Visual Studio, : https://github.com/j3k0/cordova-plugin-purchase/blob/master/doc/windows.md#building-source-on-windows

" config.xml Visual Studio. BILLING_KEY, config.xml :"

<vs:plugin name="cc.fovea.cordova.purchase" version="4.0.0" src="https://github.com/j3k0/cordova-plugin-purchase.git">
  <param name="BILLING_KEY" value="YOUR GOOGLE BILLING KEY HERE TO TARGET ANDROID" />
</vs:plugin>

andoird.

-1

Source: https://habr.com/ru/post/1629209/


All Articles