toSbpApi static method

Map<String, dynamic> toSbpApi(
  1. OnPayOrder order
)

Implementation

static Map<String, dynamic> toSbpApi(OnPayOrder order) {
  final data = <String, dynamic>{
    "receive_amount": order.amount,
    "ticker": order.ticker,
    "interface_ticker": 'QRW',
    "pay_for": order.payFor,
    "user_email": order.userEmail,
    "recipient": order.recipient,
    "is_mobile": true,
    "price_final": false,
    "pay_mode": order.payMode,
    "fast": false,
    "convert": "yes",
    "form_version": "1",
    "ln": "ru",
    "url_success_enc": order.urlSuccessEnc,
    "url_fail_enc": order.urlFailEnc,
  };

  order.additionalParams.forEach((key, value) => data["onpay_ap_$key"] = value);
  return data;
}