On this page, customer must input their UserIdand ZoneId base on the selected product.
Please note, we will validate UserId, ZoneId fields to make sure game UserId is valid. If UserId not valid on 3 times we will blocked that Userid.
5. Review an order
After customer success create an order, partner must create an CommunicationInterface on MobileApp / WebApp to receive order callback then return to partner App UI
importandroid.webkit.JavascriptInterface;importtimber.log.Timber;publicclassFormJavascriptInterface {// This code will executed after order is success @JavascriptInterfacepublicvoidpaymentOrderSuccessFully(String merchantId,String orderId,String validationToken) {//@todo your next action Timber.d("MerchantId =%s Your order number is=%s Your validation token is =%s", merchantId, orderId, validationToken);
}// This code will executed after order is success @JavascriptInterfacepublicvoidgetDetailOrder(String jsonDetailOrder) {//@todo your next action/* jsonDetailOrder: { order_id: string; status: string; qty: number; total_order_amount: number; created_at: string; updated_at: string; product_name: string; denom_name: string; } */ }}
import 'package:webview_flutter/webview_flutter.dart';finalWebViewController controller;Future<String>paymentOrderSuccessFully(){return widget.controller .runJavaScriptReturningResult('paymentOrderSuccessFully()') .then((value) {return value asString; }); }Future<String>getDetailOrder(){return widget.controller .runJavaScriptReturningResult('getDetailOrder()') .then((value) {return value asString; }); }final payment =awaitpaymentOrderSuccessFully();if (payment =="null") {// order not success } else {Map<String,dynamic> jsonMap = json.decode(payment);/* example value after decode dataOrder: { merchantId: string; orderId: string; validation_token: string; }*/ }final detailOrder =awaitgetDetailOrder();if (detailOrder =="null") {// order not success }else {Map<String,dynamic> jsonMap = json.decode(detailOrder);/* example value after decode jsonDetailOrder: { order_id: string; status: string; qty: number; total_order_amount: number; created_at: string; updated_at: string; product_name: string; denom_name: string; } */ }
7. UI after customer success order and want pay to partner (*suggest)