POST | /payment/billmate/v1/ipncallback | IPN callback for Qvickly checkout 1.0 | IPN callback for Qvickly checkout 1.0 |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class IpnCallBackResponse:
message: Optional[str] = None
success: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ServerDataResponse:
htt_p__h_o_s_t: Optional[str] = None
htt_p__c_o_n_n_e_c_t_i_o_n: Optional[str] = None
htt_p__c_a_c_h_e__c_o_n_t_r_o_l: Optional[str] = None
htt_p__a_c_c_e_p_t: Optional[str] = None
htt_p__u_s_e_r__a_g_e_n_t: Optional[str] = None
htt_p__a_c_c_e_p_t__e_n_c_o_d_i_n_g: Optional[str] = None
htt_p__a_c_c_e_p_t__l_a_n_g_u_a_g_e: Optional[str] = None
path: Optional[str] = None
serve_r__s_o_f_t_w_a_r_e: Optional[str] = None
serve_r__n_a_m_e: Optional[str] = None
serve_r__a_d_d_r: Optional[str] = None
serve_r__p_o_r_t: Optional[str] = None
remot_e__a_d_d_r: Optional[str] = None
remot_e__p_o_r_t: Optional[str] = None
gatewa_y__i_n_t_e_r_f_a_c_e: Optional[str] = None
serve_r__p_r_o_t_o_c_o_l: Optional[str] = None
reques_t__m_e_t_h_o_d: Optional[str] = None
quer_y__s_t_r_i_n_g: Optional[str] = None
reques_t__t_i_m_e: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CredentialsResponse:
hash: Optional[str] = None
id: Optional[str] = None
version: Optional[str] = None
client: Optional[str] = None
serverdata: Optional[ServerDataResponse] = None
time: Optional[str] = None
test: Optional[str] = None
language: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class QvicklyIpnCallbackResponseData:
number: Optional[str] = None
status: Optional[str] = None
orderid: Optional[str] = None
url: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class QvicklyCheckoutIpnCallBack(ICompany):
# @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
company_id: Optional[str] = None
"""
The company id, if empty will use the company id for the user you are logged in with.
"""
# @ApiMember(Description="Internal reference id (Could be booking, could be Article..)")
booking_id: Optional[str] = None
"""
Internal reference id (Could be booking, could be Article..)
"""
# @ApiMember(Description="The payment credentials.")
credentials: Optional[CredentialsResponse] = None
"""
The payment credentials.
"""
# @ApiMember(Description="The payment ipn callback data.")
data: Optional[QvicklyIpnCallbackResponseData] = None
"""
The payment ipn callback data.
"""
# @ApiMember(Description="Article type (Could be Service, rebate code types, etc..", IsRequired=true)
article_type_id: int = 0
"""
Article type (Could be Service, rebate code types, etc..
"""
Python 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>