| POST | /payments/CreditCard/Verify | Performs 0 dollar verify of a credit card. | Validates the credit card type, expiration date and performs credit card address verification against the credit card networks. |
|---|
import 'package:servicestack/servicestack.dart';
class CreditCardVerifyReply implements IHaveErrorField, IConvertible
{
String? UniqueId;
int? ErrorCode;
String? ErrorMessage;
String? CardRef;
bool? IsError;
CreditCardVerifyReply({this.UniqueId,this.ErrorCode,this.ErrorMessage,this.CardRef,this.IsError});
CreditCardVerifyReply.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UniqueId = json['UniqueId'];
ErrorCode = json['ErrorCode'];
ErrorMessage = json['ErrorMessage'];
CardRef = json['CardRef'];
IsError = json['IsError'];
return this;
}
Map<String, dynamic> toJson() => {
'UniqueId': UniqueId,
'ErrorCode': ErrorCode,
'ErrorMessage': ErrorMessage,
'CardRef': CardRef,
'IsError': IsError
};
getTypeName() => "CreditCardVerifyReply";
TypeContext? context = _ctx;
}
class SalesForceCreditCardVerify implements IConvertible
{
String? UniqueId;
int? ClientId;
String? GroupId;
String? UserId;
int? BhUserId;
String? Location;
String? CurrencyCode;
String? NameOnCard;
String? Address1;
String? Address2;
String? City;
String? State;
String? PostalCode;
bool? VerifyPostalCode;
String? Country;
String? CardType;
String? CardReferenceOrCardNumber;
int? ExpMonth;
int? ExpYear;
String? Cvv;
double? Amount;
String? ChapAndUser;
String? Description;
int? PayLinkID;
SalesForceCreditCardVerify({this.UniqueId,this.ClientId,this.GroupId,this.UserId,this.BhUserId,this.Location,this.CurrencyCode,this.NameOnCard,this.Address1,this.Address2,this.City,this.State,this.PostalCode,this.VerifyPostalCode,this.Country,this.CardType,this.CardReferenceOrCardNumber,this.ExpMonth,this.ExpYear,this.Cvv,this.Amount,this.ChapAndUser,this.Description,this.PayLinkID});
SalesForceCreditCardVerify.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UniqueId = json['UniqueId'];
ClientId = json['ClientId'];
GroupId = json['GroupId'];
UserId = json['UserId'];
BhUserId = json['BhUserId'];
Location = json['Location'];
CurrencyCode = json['CurrencyCode'];
NameOnCard = json['NameOnCard'];
Address1 = json['Address1'];
Address2 = json['Address2'];
City = json['City'];
State = json['State'];
PostalCode = json['PostalCode'];
VerifyPostalCode = json['VerifyPostalCode'];
Country = json['Country'];
CardType = json['CardType'];
CardReferenceOrCardNumber = json['CardReferenceOrCardNumber'];
ExpMonth = json['ExpMonth'];
ExpYear = json['ExpYear'];
Cvv = json['Cvv'];
Amount = JsonConverters.toDouble(json['Amount']);
ChapAndUser = json['ChapAndUser'];
Description = json['Description'];
PayLinkID = json['PayLinkID'];
return this;
}
Map<String, dynamic> toJson() => {
'UniqueId': UniqueId,
'ClientId': ClientId,
'GroupId': GroupId,
'UserId': UserId,
'BhUserId': BhUserId,
'Location': Location,
'CurrencyCode': CurrencyCode,
'NameOnCard': NameOnCard,
'Address1': Address1,
'Address2': Address2,
'City': City,
'State': State,
'PostalCode': PostalCode,
'VerifyPostalCode': VerifyPostalCode,
'Country': Country,
'CardType': CardType,
'CardReferenceOrCardNumber': CardReferenceOrCardNumber,
'ExpMonth': ExpMonth,
'ExpYear': ExpYear,
'Cvv': Cvv,
'Amount': Amount,
'ChapAndUser': ChapAndUser,
'Description': Description,
'PayLinkID': PayLinkID
};
getTypeName() => "SalesForceCreditCardVerify";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
'CreditCardVerifyReply': TypeInfo(TypeOf.Class, create:() => CreditCardVerifyReply()),
'SalesForceCreditCardVerify': TypeInfo(TypeOf.Class, create:() => SalesForceCreditCardVerify()),
});
Dart SalesForceCreditCardVerify 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 /payments/CreditCard/Verify HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SalesForceCreditCardVerify xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
<Address1>String</Address1>
<Address2>String</Address2>
<Amount>0</Amount>
<BhUserId>0</BhUserId>
<CardReferenceOrCardNumber>String</CardReferenceOrCardNumber>
<CardType>String</CardType>
<ChapAndUser>String</ChapAndUser>
<City>String</City>
<ClientId>0</ClientId>
<Country>String</Country>
<CurrencyCode>String</CurrencyCode>
<Cvv>String</Cvv>
<Description>String</Description>
<ExpMonth>0</ExpMonth>
<ExpYear>0</ExpYear>
<GroupId>String</GroupId>
<Location>String</Location>
<NameOnCard>String</NameOnCard>
<PayLinkID>0</PayLinkID>
<PostalCode>String</PostalCode>
<State>String</State>
<UniqueId>String</UniqueId>
<UserId>String</UserId>
<VerifyPostalCode>false</VerifyPostalCode>
</SalesForceCreditCardVerify>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreditCardVerifyReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce"> <CardRef>String</CardRef> <ErrorCode>0</ErrorCode> <ErrorMessage>String</ErrorMessage> <UniqueId>String</UniqueId> </CreditCardVerifyReply>