efun.id.api

<back to all web services

OnePayPaymentIpnUrlRequest

The following routes are available for this service:
GET/api/v1/onepay/payment-ipn-invoice
import 'package:servicestack/servicestack.dart';

class OnePayLogResponse implements IConvertible
{
    String? userName;
    String? orderId;
    int? price;
    String? payCode;
    String? payMsg;
    String? payChannel;
    DateTime? payDate;

    OnePayLogResponse({this.userName,this.orderId,this.price,this.payCode,this.payMsg,this.payChannel,this.payDate});
    OnePayLogResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        userName = json['userName'];
        orderId = json['orderId'];
        price = json['price'];
        payCode = json['payCode'];
        payMsg = json['payMsg'];
        payChannel = json['payChannel'];
        payDate = JsonConverters.fromJson(json['payDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'userName': userName,
        'orderId': orderId,
        'price': price,
        'payCode': payCode,
        'payMsg': payMsg,
        'payChannel': payChannel,
        'payDate': JsonConverters.toJson(payDate,'DateTime',context!)
    };

    getTypeName() => "OnePayLogResponse";
    TypeContext? context = _ctx;
}

class OnePayPaymentIpnUrlRequest implements IConvertible
{
    String? vpc_MerchTxnRef;
    String? vpc_OrderInfo;
    String? vpc_CardNum;

    OnePayPaymentIpnUrlRequest({this.vpc_MerchTxnRef,this.vpc_OrderInfo,this.vpc_CardNum});
    OnePayPaymentIpnUrlRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        vpc_MerchTxnRef = json['vpc_MerchTxnRef'];
        vpc_OrderInfo = json['vpc_OrderInfo'];
        vpc_CardNum = json['vpc_CardNum'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'vpc_MerchTxnRef': vpc_MerchTxnRef,
        'vpc_OrderInfo': vpc_OrderInfo,
        'vpc_CardNum': vpc_CardNum
    };

    getTypeName() => "OnePayPaymentIpnUrlRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'efun_id_api_sandbox.efun.vn', types: <String, TypeInfo> {
    'OnePayLogResponse': TypeInfo(TypeOf.Class, create:() => OnePayLogResponse()),
    'OnePayPaymentIpnUrlRequest': TypeInfo(TypeOf.Class, create:() => OnePayPaymentIpnUrlRequest()),
});

Dart OnePayPaymentIpnUrlRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/v1/onepay/payment-ipn-invoice HTTP/1.1 
Host: efun-id-api-sandbox.efun.vn 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"userName":"String","orderId":"String","price":0,"payCode":"String","payMsg":"String","payChannel":"String","payDate":"0001-01-01T00:00:00.0000000+07:06"}