POST | /licenses/dibscallback/ | Save Dibs Callback | This service is used for the DIBS callback. |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
namespace BokaMera.API.ServiceModel.Dtos
{
public partial class DibsCallbackDto
{
///<summary>
///The company id to save the credit card to
///</summary>
[ApiMember(DataType="string", Description="The company id to save the credit card to", IsRequired=true)]
public virtual Guid CompanyId { get; set; }
///<summary>
///The dibs card expiration date (yymm)
///</summary>
[ApiMember(DataType="string", Description="The dibs card expiration date (yymm)", IsRequired=true)]
public virtual string cardexpdate { get; set; }
///<summary>
///The dibs transact id
///</summary>
[ApiMember(DataType="string", Description="The dibs transact id", IsRequired=true)]
public virtual string transact { get; set; }
///<summary>
///The dibs card number (masked)
///</summary>
[ApiMember(DataType="string", Description="The dibs card number (masked)", IsRequired=true)]
public virtual string cardnomask { get; set; }
///<summary>
///The dibs paytype
///</summary>
[ApiMember(DataType="string", Description="The dibs paytype", IsRequired=true)]
public virtual string paytype { get; set; }
///<summary>
///The dibs currency
///</summary>
[ApiMember(DataType="string", Description="The dibs currency", IsRequired=true)]
public virtual string currency { get; set; }
///<summary>
///The dibs acquirer
///</summary>
[ApiMember(DataType="string", Description="The dibs acquirer", IsRequired=true)]
public virtual string acquirer { get; set; }
///<summary>
///The dibs approval code
///</summary>
[ApiMember(DataType="string", Description="The dibs approval code", IsRequired=true)]
public virtual string approvalcode { get; set; }
///<summary>
///The dibs status code
///</summary>
[ApiMember(DataType="string", Description="The dibs status code", IsRequired=true)]
public virtual string statuscode { get; set; }
///<summary>
///The dibs amount
///</summary>
[ApiMember(DataType="string", Description="The dibs amount", IsRequired=true)]
public virtual string amount { get; set; }
///<summary>
///The redirect url to send user back to after added creditcard
///</summary>
[ApiMember(DataType="uri", Description="The redirect url to send user back to after added creditcard", IsRequired=true)]
public virtual string RedirectUrl { get; set; }
///<summary>
///The unique token for this request
///</summary>
[ApiMember(DataType="string", Description="The unique token for this request", IsRequired=true)]
public virtual string Token { get; set; }
///<summary>
///status of the callback url
///</summary>
[ApiMember(DataType="enum", Description="status of the callback url", IsRequired=true)]
public virtual DibStatus Status { get; set; }
}
public enum DibStatus
{
Success,
Cancelled,
}
}
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 /licenses/dibscallback/ HTTP/1.1
Host: api.bokamera.se
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<DibsCallbackDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<RedirectUrl>String</RedirectUrl>
<Status>Success</Status>
<Token>String</Token>
<acquirer>String</acquirer>
<amount>String</amount>
<approvalcode>String</approvalcode>
<cardexpdate>String</cardexpdate>
<cardnomask>String</cardnomask>
<currency>String</currency>
<paytype>String</paytype>
<statuscode>String</statuscode>
<transact>String</transact>
</DibsCallbackDto>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />