Skip to content

Commit 97135ac

Browse files
Fix payments module
1 parent 2133ddd commit 97135ac

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

bridge/lib/web/bridge_payments.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let js_bridge_payments = {
44
},
55

66
js_bridge_payments_purchase: function (handler, id, onSuccess, onFailure) {
7-
bridge.payments.purchase(id)
7+
bridge.payments.purchase(UTF8ToString(id))
88
.then(purchase => {
99
{{{ makeDynCall('viiii', 'handler') }}} (onSuccess, onFailure, 0, packToJson(purchase));
1010
})
@@ -14,7 +14,7 @@ let js_bridge_payments = {
1414
},
1515

1616
js_bridge_payments_consumePurchase: function (handler, id, onSuccess, onFailure) {
17-
bridge.payments.consumePurchase(id)
17+
bridge.payments.consumePurchase(UTF8ToString(id))
1818
.then(() => {
1919
{{{ makeDynCall('viiii', 'handler') }}} (onSuccess, onFailure, 0, packToJson());
2020
})

game.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ htmlfile = /bridge/engine_template.html
1919
[project]
2020
title = Bridge-defold
2121
dependencies =
22+
bundle_resources = /res
2223

2324
[library]
2425
include_dirs = bridge
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"platforms": {
3+
"game_distribution": {
4+
"gameId": ""
5+
},
6+
"telegram": {
7+
"adsgramBlockId": ""
8+
},
9+
"y8": {
10+
"gameId": "",
11+
"adsenseId": "",
12+
"channelId": ""
13+
},
14+
"lagged": {
15+
"devId": "",
16+
"publisherId": ""
17+
},
18+
"facebook": {
19+
"bannerPlacementId": "",
20+
"interstitialPlacements": [],
21+
"rewardedPlacements": []
22+
}
23+
},
24+
"payments": [
25+
{
26+
"commonId": "test_product",
27+
"yandex": {
28+
"id": "test_product"
29+
},
30+
"facebook": {
31+
"productID": "test_product"
32+
},
33+
"msn": {
34+
"productId": "test_product"
35+
},
36+
"playgama": {
37+
"amount": 1
38+
},
39+
"qa_tool": {
40+
"amount": 1
41+
},
42+
"playdeck": {
43+
"amount": 1,
44+
"description": "TEST PRODUCT"
45+
}
46+
}
47+
]
48+
}

0 commit comments

Comments
 (0)