POST | /payment/billmate/v1/ipncallback | IPN callback for Qvickly checkout 1.0 | IPN callback for Qvickly checkout 1.0 |
---|
import 'package:servicestack/servicestack.dart';
class IpnCallBackResponse implements IConvertible
{
String? Message;
bool? Success;
IpnCallBackResponse({this.Message,this.Success});
IpnCallBackResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Message = json['Message'];
Success = json['Success'];
return this;
}
Map<String, dynamic> toJson() => {
'Message': Message,
'Success': Success
};
getTypeName() => "IpnCallBackResponse";
TypeContext? context = _ctx;
}
class ServerDataResponse implements IConvertible
{
String? HTTP_HOST;
String? HTTP_CONNECTION;
String? HTTP_CACHE_CONTROL;
String? HTTP_ACCEPT;
String? HTTP_USER_AGENT;
String? HTTP_ACCEPT_ENCODING;
String? HTTP_ACCEPT_LANGUAGE;
String? PATH;
String? SERVER_SOFTWARE;
String? SERVER_NAME;
String? SERVER_ADDR;
String? SERVER_PORT;
String? REMOTE_ADDR;
String? REMOTE_PORT;
String? GATEWAY_INTERFACE;
String? SERVER_PROTOCOL;
String? REQUEST_METHOD;
String? QUERY_STRING;
String? REQUEST_TIME;
ServerDataResponse({this.HTTP_HOST,this.HTTP_CONNECTION,this.HTTP_CACHE_CONTROL,this.HTTP_ACCEPT,this.HTTP_USER_AGENT,this.HTTP_ACCEPT_ENCODING,this.HTTP_ACCEPT_LANGUAGE,this.PATH,this.SERVER_SOFTWARE,this.SERVER_NAME,this.SERVER_ADDR,this.SERVER_PORT,this.REMOTE_ADDR,this.REMOTE_PORT,this.GATEWAY_INTERFACE,this.SERVER_PROTOCOL,this.REQUEST_METHOD,this.QUERY_STRING,this.REQUEST_TIME});
ServerDataResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
HTTP_HOST = json['HTTP_HOST'];
HTTP_CONNECTION = json['HTTP_CONNECTION'];
HTTP_CACHE_CONTROL = json['HTTP_CACHE_CONTROL'];
HTTP_ACCEPT = json['HTTP_ACCEPT'];
HTTP_USER_AGENT = json['HTTP_USER_AGENT'];
HTTP_ACCEPT_ENCODING = json['HTTP_ACCEPT_ENCODING'];
HTTP_ACCEPT_LANGUAGE = json['HTTP_ACCEPT_LANGUAGE'];
PATH = json['PATH'];
SERVER_SOFTWARE = json['SERVER_SOFTWARE'];
SERVER_NAME = json['SERVER_NAME'];
SERVER_ADDR = json['SERVER_ADDR'];
SERVER_PORT = json['SERVER_PORT'];
REMOTE_ADDR = json['REMOTE_ADDR'];
REMOTE_PORT = json['REMOTE_PORT'];
GATEWAY_INTERFACE = json['GATEWAY_INTERFACE'];
SERVER_PROTOCOL = json['SERVER_PROTOCOL'];
REQUEST_METHOD = json['REQUEST_METHOD'];
QUERY_STRING = json['QUERY_STRING'];
REQUEST_TIME = json['REQUEST_TIME'];
return this;
}
Map<String, dynamic> toJson() => {
'HTTP_HOST': HTTP_HOST,
'HTTP_CONNECTION': HTTP_CONNECTION,
'HTTP_CACHE_CONTROL': HTTP_CACHE_CONTROL,
'HTTP_ACCEPT': HTTP_ACCEPT,
'HTTP_USER_AGENT': HTTP_USER_AGENT,
'HTTP_ACCEPT_ENCODING': HTTP_ACCEPT_ENCODING,
'HTTP_ACCEPT_LANGUAGE': HTTP_ACCEPT_LANGUAGE,
'PATH': PATH,
'SERVER_SOFTWARE': SERVER_SOFTWARE,
'SERVER_NAME': SERVER_NAME,
'SERVER_ADDR': SERVER_ADDR,
'SERVER_PORT': SERVER_PORT,
'REMOTE_ADDR': REMOTE_ADDR,
'REMOTE_PORT': REMOTE_PORT,
'GATEWAY_INTERFACE': GATEWAY_INTERFACE,
'SERVER_PROTOCOL': SERVER_PROTOCOL,
'REQUEST_METHOD': REQUEST_METHOD,
'QUERY_STRING': QUERY_STRING,
'REQUEST_TIME': REQUEST_TIME
};
getTypeName() => "ServerDataResponse";
TypeContext? context = _ctx;
}
class CredentialsResponse implements IConvertible
{
String? hash;
String? id;
String? version;
String? client;
ServerDataResponse? serverdata;
String? time;
String? test;
String? language;
CredentialsResponse({this.hash,this.id,this.version,this.client,this.serverdata,this.time,this.test,this.language});
CredentialsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
hash = json['hash'];
id = json['id'];
version = json['version'];
client = json['client'];
serverdata = JsonConverters.fromJson(json['serverdata'],'ServerDataResponse',context!);
time = json['time'];
test = json['test'];
language = json['language'];
return this;
}
Map<String, dynamic> toJson() => {
'hash': hash,
'id': id,
'version': version,
'client': client,
'serverdata': JsonConverters.toJson(serverdata,'ServerDataResponse',context!),
'time': time,
'test': test,
'language': language
};
getTypeName() => "CredentialsResponse";
TypeContext? context = _ctx;
}
class QvicklyIpnCallbackResponseData implements IConvertible
{
String? number;
String? status;
String? orderid;
String? url;
QvicklyIpnCallbackResponseData({this.number,this.status,this.orderid,this.url});
QvicklyIpnCallbackResponseData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
number = json['number'];
status = json['status'];
orderid = json['orderid'];
url = json['url'];
return this;
}
Map<String, dynamic> toJson() => {
'number': number,
'status': status,
'orderid': orderid,
'url': url
};
getTypeName() => "QvicklyIpnCallbackResponseData";
TypeContext? context = _ctx;
}
class QvicklyCheckoutIpnCallBack implements ICompany, IConvertible
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
// @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
String? CompanyId;
/**
* Internal reference id (Could be booking, could be Article..)
*/
// @ApiMember(Description="Internal reference id (Could be booking, could be Article..)")
String? BookingId;
/**
* The payment credentials.
*/
// @ApiMember(Description="The payment credentials.")
CredentialsResponse? credentials;
/**
* The payment ipn callback data.
*/
// @ApiMember(Description="The payment ipn callback data.")
QvicklyIpnCallbackResponseData? data;
/**
* Article type (Could be Service, rebate code types, etc..
*/
// @ApiMember(Description="Article type (Could be Service, rebate code types, etc..", IsRequired=true)
int? ArticleTypeId;
QvicklyCheckoutIpnCallBack({this.CompanyId,this.BookingId,this.credentials,this.data,this.ArticleTypeId});
QvicklyCheckoutIpnCallBack.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
BookingId = json['BookingId'];
credentials = JsonConverters.fromJson(json['credentials'],'CredentialsResponse',context!);
data = JsonConverters.fromJson(json['data'],'QvicklyIpnCallbackResponseData',context!);
ArticleTypeId = json['ArticleTypeId'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'BookingId': BookingId,
'credentials': JsonConverters.toJson(credentials,'CredentialsResponse',context!),
'data': JsonConverters.toJson(data,'QvicklyIpnCallbackResponseData',context!),
'ArticleTypeId': ArticleTypeId
};
getTypeName() => "QvicklyCheckoutIpnCallBack";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'IpnCallBackResponse': TypeInfo(TypeOf.Class, create:() => IpnCallBackResponse()),
'ServerDataResponse': TypeInfo(TypeOf.Class, create:() => ServerDataResponse()),
'CredentialsResponse': TypeInfo(TypeOf.Class, create:() => CredentialsResponse()),
'QvicklyIpnCallbackResponseData': TypeInfo(TypeOf.Class, create:() => QvicklyIpnCallbackResponseData()),
'QvicklyCheckoutIpnCallBack': TypeInfo(TypeOf.Class, create:() => QvicklyCheckoutIpnCallBack()),
});
Dart QvicklyCheckoutIpnCallBack DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /payment/billmate/v1/ipncallback HTTP/1.1
Host: api.bokamera.se
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<QvicklyCheckoutIpnCallBack xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<ArticleTypeId>0</ArticleTypeId>
<BookingId>String</BookingId>
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<credentials>
<client>String</client>
<hash>String</hash>
<id>String</id>
<language>String</language>
<serverdata>
<GATEWAY_INTERFACE>String</GATEWAY_INTERFACE>
<HTTP_ACCEPT>String</HTTP_ACCEPT>
<HTTP_ACCEPT_ENCODING>String</HTTP_ACCEPT_ENCODING>
<HTTP_ACCEPT_LANGUAGE>String</HTTP_ACCEPT_LANGUAGE>
<HTTP_CACHE_CONTROL>String</HTTP_CACHE_CONTROL>
<HTTP_CONNECTION>String</HTTP_CONNECTION>
<HTTP_HOST>String</HTTP_HOST>
<HTTP_USER_AGENT>String</HTTP_USER_AGENT>
<PATH>String</PATH>
<QUERY_STRING>String</QUERY_STRING>
<REMOTE_ADDR>String</REMOTE_ADDR>
<REMOTE_PORT>String</REMOTE_PORT>
<REQUEST_METHOD>String</REQUEST_METHOD>
<REQUEST_TIME>String</REQUEST_TIME>
<SERVER_ADDR>String</SERVER_ADDR>
<SERVER_NAME>String</SERVER_NAME>
<SERVER_PORT>String</SERVER_PORT>
<SERVER_PROTOCOL>String</SERVER_PROTOCOL>
<SERVER_SOFTWARE>String</SERVER_SOFTWARE>
</serverdata>
<test>String</test>
<time>String</time>
<version>String</version>
</credentials>
<data xmlns:d2p1="http://schemas.datacontract.org/2004/07/QvicklyIntegration.Models.Payment">
<d2p1:number>String</d2p1:number>
<d2p1:orderid>String</d2p1:orderid>
<d2p1:status>String</d2p1:status>
<d2p1:url>String</d2p1:url>
</data>
</QvicklyCheckoutIpnCallBack>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <IpnCallBackResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos"> <Message>String</Message> <Success>false</Success> </IpnCallBackResponse>