Add myket in app purchase
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

26 lignes
747 B

  1. import 'dart:async';
  2. import 'dart:convert';
  3. import 'package:flutter/services.dart';
  4. class Myketpayment {
  5. static const MethodChannel _channel = const MethodChannel('myketpayment');
  6. static Future<bool> setup(String rsa, {String purchasedSku = ''}) async {
  7. final bool version = await _channel.invokeMethod('setup', {"rsa": rsa, 'purchasedSku': purchasedSku});
  8. return version;
  9. }
  10. static Future<Map> buy({String sku, bool consume = false, String payload = ""}) async {
  11. Map result = await _channel.invokeMethod('buy', {"sku": sku, "payload": payload, "consume": consume});
  12. return result;
  13. }
  14. static Future<bool> check() async {
  15. final bool version = await _channel.invokeMethod('check', {});
  16. return version;
  17. }
  18. }