Commit 607ad49c5d3cb416b58b66d8a121cedee051a07c
1 parent
064eb20549
Exists in
master
分离iap支付
Showing 1 changed file with 11 additions and 1 deletions Side-by-side Diff
IntegrationGuide.md
... | ... | @@ -169,7 +169,17 @@ InitializeCallback为初始化回调接口,此接口只有一个回调方法init |
169 | 169 | 调用pay方法时,必须穿入一个bundle对象,包含如上字段,除nick和roleId外所有字段必须全部包含,其中sessionKey为登录时返回的sessionKey |
170 | 170 | |
171 | 171 | |
172 | -2)PurchaseCallback为支付状态回调接口,此接口含有3个方法 | |
172 | +2)IAP支付,roleId为可选参数,其他参数必传 | |
173 | + | |
174 | + Bundle payInfo = new Bundle(); | |
175 | + payInfo.putString("product", "gp_skuId"); | |
176 | + payInfo.putFloat("amount", 0.1f); | |
177 | + payInfo.putString("extraInfo", "This is demo!"); | |
178 | + payInfo.putString("serverId", "100"); | |
179 | + payInfo.putString("roleId","100123"); | |
180 | + GumpSDK.iap(MainActivity.this, payInfo, PurchaseCallback); | |
181 | + | |
182 | +3)PurchaseCallback为支付状态回调接口,此接口含有3个方法 | |
173 | 183 | |
174 | 184 | @Override |
175 | 185 | public void onPurchaseCompleted(PurchaseResult result) { |