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.
 
 
 
 
 
 

22 lignes
560 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) async {
  7. final bool version = await _channel.invokeMethod('setup', {"rsa": rsa});
  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. }