POST | /POSCardlessRefund |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Paysecure.ServiceModel;
using Paysecure.ServiceModel.Types;
namespace Paysecure.ServiceModel
{
public partial class MerchantDescriptor
: MerchantDescriptorBase
{
public virtual string Name { get; set; }
public virtual string Address { get; set; }
public virtual string City { get; set; }
public virtual string State { get; set; }
public virtual string Zip { get; set; }
public virtual string Country { get; set; }
public virtual string CustomerServiceNumber { get; set; }
public virtual string MCC { get; set; }
public virtual string FNSnum { get; set; }
public virtual string Email { get; set; }
}
public partial class MerchantDescriptorBase
{
public virtual MerchantDataElements DataElements { get; set; }
}
[DataContract]
public partial class POSCardlessRefund
: PaysecureResponseInternal
{
[DataMember]
public virtual string ErrorMessage { get; set; }
[DataMember]
public virtual string ErrorCode { get; set; }
[DataMember]
public virtual string TranId { get; set; }
[DataMember]
public virtual string Network { get; set; }
[DataMember]
public virtual string ResponseCode { get; set; }
[DataMember]
public virtual NetworkResponseData NetworkResponseData { get; set; }
}
[DataContract]
public partial class POSCardlessRefundRequest
{
[DataMember]
public virtual RequestorCredentials Credentials { get; set; }
[DataMember]
public virtual string ReferenceKey { get; set; }
[DataMember]
public virtual string OriginalReferenceKey { get; set; }
[DataMember]
public virtual int Amount { get; set; }
[DataMember]
public virtual string TID { get; set; }
[DataMember]
public virtual string MID { get; set; }
[DataMember]
public virtual NetworkRequestData NetworkRequestData { get; set; }
///<summary>
///Local Date Format mmddyyyy. For Example:- 01202017
///</summary>
[DataMember]
public virtual string LocalDate { get; set; }
///<summary>
///Local Time Format HHmmss. For Example :- 012322
///</summary>
[DataMember]
public virtual string LocalTime { get; set; }
[DataMember]
public virtual MerchantDescriptor MerchantDetails { get; set; }
[DataMember]
public virtual string Custom1 { get; set; }
[DataMember]
public virtual string Custom2 { get; set; }
[DataMember]
public virtual string Custom3 { get; set; }
[DataMember]
public virtual string Custom4 { get; set; }
[DataMember]
public virtual string Custom5 { get; set; }
[DataMember]
public virtual string SignatureHash { get; set; }
[DataMember]
public virtual ExtendedData ExtendedData { get; set; }
}
}
namespace Paysecure.ServiceModel.Types
{
public enum BillPayGroup
{
Default,
Single,
Recurring,
Installment,
Deferred,
}
public partial class BillPayGroupIndicator
{
public virtual string MITTotalPaymentCount { get; set; }
public virtual string MITAmountType { get; set; }
public virtual string MITAmount { get; set; }
public virtual string MITUniqueID { get; set; }
public virtual string MITFrequency { get; set; }
public virtual string MITValidationFlag { get; set; }
public virtual string MITValidationReference { get; set; }
public virtual string MITSequenceIndicator { get; set; }
}
public enum CardAccountUpdaterInfo
{
Default,
Supported,
NotSupported,
}
public partial class CardonFileIndicatorDescriptor
{
public virtual CardonFileInfo CardonFile { get; set; }
public virtual StoredCredentialIndicatorInfo StoredCredentialIndicator { get; set; }
public virtual TransactionInitiateInfo TransactionInitiate { get; set; }
public virtual ScheduleIndicatorInfo ScheduleIndicator { get; set; }
public virtual string NetworkTransactionId { get; set; }
}
public enum CardonFileInfo
{
Default,
Supported,
NotSupported,
}
public enum ChargeTypeInfo
{
Default,
PartialShipment,
Delayed,
NoShow,
Resubmission,
}
public enum DigitalWalletInfo
{
Default,
Staged,
Passthrough,
}
[DataContract]
public partial class ExtendedData
{
[DataMember]
public virtual string Track2DataForEMVTransaction { get; set; }
[DataMember]
public virtual SenderInfo SenderInfo { get; set; }
[DataMember]
public virtual int CashbackAmount { get; set; }
[DataMember]
public virtual NetworkName Network { get; set; }
[DataMember]
public virtual ReceiverInfo ReceiverInfo { get; set; }
[DataMember]
public virtual BillPayGroup BillPayGroup { get; set; }
[DataMember]
public virtual WalletDescriptor WalletData { get; set; }
[DataMember]
public virtual SecureDescriptor SecureData { get; set; }
[DataMember]
public virtual Level2Descriptor Level2Data { get; set; }
[DataMember]
public virtual PaymentFacilitatorDescriptor PaymentFacilitatorData { get; set; }
[DataMember]
public virtual TokenDescriptor TokenData { get; set; }
[DataMember]
public virtual string OTPTranId { get; set; }
[DataMember]
public virtual int CurrentShipment { get; set; }
[DataMember]
public virtual int TotalShipments { get; set; }
[DataMember]
public virtual bool IsTokenRequested { get; set; }
[DataMember]
public virtual CardonFileIndicatorDescriptor CardonFileIndicator { get; set; }
[DataMember]
public virtual CardAccountUpdaterInfo CardAccountUpdater { get; set; }
[DataMember]
public virtual int RetryAttemptCount { get; set; }
[DataMember]
public virtual int TotalAuthAmount { get; set; }
[DataMember]
public virtual string SignatureHashVersion { get; set; }
[DataMember]
public virtual OrderTypeInfo OrderTypeDetail { get; set; }
[DataMember]
public virtual BillPayGroupIndicator BillPayGroupIndicator { get; set; }
[DataMember]
public virtual ChargeTypeInfo ChargeTypeDetail { get; set; }
[DataMember]
public virtual SAFEligibleFlag SAFEligible { get; set; }
}
public enum FundingSourceType
{
DepositAccount,
Credit,
Debit,
Prepaid,
}
[DataContract]
public partial class InOutTimes
{
}
public partial class Level2Descriptor
{
public virtual TaxIndicator TaxDetails { get; set; }
public virtual string MerchantReferenceNumber { get; set; }
public virtual string MerchantTaxId { get; set; }
public virtual string OrderNumber { get; set; }
public virtual int TaxAmount { get; set; }
public virtual string DestinationPostalCode { get; set; }
public virtual string ProductDescription { get; set; }
}
public partial class MerchantDataElements
{
public virtual int RefundSettlementTypeDetails { get; set; }
public virtual bool SendRecurringPOSEntryModeFeature { get; set; }
public virtual bool UseOrgPOSCode { get; set; }
}
public enum NetworkName
{
Default,
NYCE,
CU24,
XCEL,
STAR,
PULS,
SHZM,
VISA,
MAST,
DISC,
AMEX,
ALIP,
UPIN,
STAC,
STNE,
MAES,
INTL,
}
public partial class NetworkRequestData
{
public virtual string AliPayPartnerId { get; set; }
public virtual string WebHookURL { get; set; }
public virtual string OrderTitle { get; set; }
public virtual string OrderDetail { get; set; }
public virtual string TerminalIP { get; set; }
public virtual string OrderNumber { get; set; }
}
public partial class NetworkResponseData
{
public virtual string AliPayTransId { get; set; }
public virtual string AliPayTransactionTime { get; set; }
public virtual string ResponseCode { get; set; }
public virtual string WeChatPayTransId { get; set; }
public virtual string WeChatPayTransactionTime { get; set; }
public virtual string WeChatPayOpenId { get; set; }
}
public enum OrderTypeInfo
{
Default,
Standing,
Subscription,
}
public partial class PaymentFacilitatorDescriptor
{
public virtual string PaymentFacilitatorIndicator { get; set; }
public virtual string PFPhoneNumber { get; set; }
public virtual string SubMerchID { get; set; }
public virtual string SellerID { get; set; }
}
[DataContract]
public partial class PaysecureResponseInternal
{
[DataMember(EmitDefaultValue=false)]
public virtual RequestTimestamps Timestamps { get; set; }
}
public partial class ReceiverInfo
{
public virtual string ReferenceNumber { get; set; }
public virtual string AccountNumber { get; set; }
///<summary>
///Name Format FirstName{Space}LastName. For Example :- Alvaro Morata
///</summary>
public virtual string Name { get; set; }
public virtual string Address { get; set; }
public virtual string City { get; set; }
public virtual string State { get; set; }
public virtual string Country { get; set; }
public virtual string Zip { get; set; }
public virtual string PhoneNumber { get; set; }
}
public partial class RequestorCredentials
{
[Required]
public virtual string MerchantId { get; set; }
[Required]
public virtual string UserName { get; set; }
[Required]
public virtual string Password { get; set; }
[Required]
public virtual string Version { get; set; }
}
[DataContract]
public partial class RequestTimestamps
{
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes AppLayer { get; set; }
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes ParentLookup { get; set; }
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes RetryLookup { get; set; }
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes GetCardData { get; set; }
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes CardTokenize { get; set; }
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes CardEncrypt { get; set; }
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes DBInsert { get; set; }
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes BackendProcess { get; set; }
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes DBUpdate { get; set; }
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes ParentUpdate { get; set; }
[DataMember(EmitDefaultValue=false)]
public virtual InOutTimes Network { get; set; }
}
public enum SAFEligibleFlag
{
Default,
True,
False,
}
public enum ScheduleIndicatorInfo
{
Default,
Scheduled,
Unscheduled,
}
public partial class SecureDescriptor
{
public virtual string CAVV { get; set; }
public virtual string SecureTransactionId { get; set; }
}
public partial class SenderInfo
{
public virtual string ReferenceNumber { get; set; }
public virtual string AccountNumber { get; set; }
///<summary>
///Name Format FirstName{Space}LastName. For Example :- Alvaro Morata
///</summary>
public virtual string Name { get; set; }
public virtual string Address { get; set; }
public virtual string City { get; set; }
public virtual string State { get; set; }
public virtual string Country { get; set; }
///<summary>
///DateOfBirth Format MMDDYYYY. For Example :- 05051960
///</summary>
public virtual string DateOfBirth { get; set; }
public virtual string Zip { get; set; }
public virtual string PhoneNumber { get; set; }
public virtual FundingSourceType FundingSource { get; set; }
}
public enum StoredCredentialIndicatorInfo
{
Default,
Initial,
Subsequent,
}
public enum TaxIndicator
{
Default,
NoTaxInfoProvided,
TaxInfoProvided,
TaxExemptItem,
}
public partial class TokenDescriptor
{
public virtual TokenTypes TokenType { get; set; }
public virtual string TokenCryptogramData1 { get; set; }
public virtual string TokenCryptogramData2 { get; set; }
}
public enum TokenTypes
{
Default,
UCAF,
DSRP,
UCAFDSRP,
VisaVerified,
DigitalWallet,
VisaVerifiedDigitalWallet,
}
public enum TransactionInitiateInfo
{
Default,
Merchant,
Terminal,
Customer,
}
public partial class WalletDescriptor
{
public virtual string Type { get; set; }
public virtual string EncryptedData { get; set; }
public virtual string ApplicationDataHash { get; set; }
public virtual string EphemeralPublicKey { get; set; }
public virtual string PublicKeyHash { get; set; }
public virtual string TransactionId { get; set; }
public virtual string Signature { get; set; }
public virtual string Version { get; set; }
public virtual string ApplicationData { get; set; }
public virtual string MerchantIdentifier { get; set; }
public virtual string SpecialPayment { get; set; }
public virtual DigitalWalletInfo DigitalWalletIndicator { get; set; }
}
}
C# POSCardlessRefundRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /POSCardlessRefund HTTP/1.1
Host: api.paysecure.acculynk.net
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Credentials":{"MerchantId":"String","UserName":"String","Password":"String","Version":"String"},"ReferenceKey":"String","OriginalReferenceKey":"String","Amount":0,"TID":"String","MID":"String","NetworkRequestData":{"AliPayPartnerId":"String","WebHookURL":"String","OrderTitle":"String","OrderDetail":"String","TerminalIP":"String","OrderNumber":"String"},"LocalDate":"String","LocalTime":"String","MerchantDetails":{"Name":"String","Address":"String","City":"String","State":"String","Zip":"String","Country":"String","CustomerServiceNumber":"String","MCC":"String","FNSnum":"String","Email":"String","DataElements":{"RefundSettlementTypeDetails":0,"SendRecurringPOSEntryModeFeature":false,"UseOrgPOSCode":false}},"Custom1":"String","Custom2":"String","Custom3":"String","Custom4":"String","Custom5":"String","SignatureHash":"String","ExtendedData":{"Track2DataForEMVTransaction":"String","SenderInfo":{"ReferenceNumber":"String","AccountNumber":"String","Name":"String","Address":"String","City":"String","State":"String","Country":"String","DateOfBirth":"String","Zip":"String","PhoneNumber":"String","FundingSource":"DepositAccount"},"CashbackAmount":0,"Network":"Default","ReceiverInfo":{"ReferenceNumber":"String","AccountNumber":"String","Name":"String","Address":"String","City":"String","State":"String","Country":"String","Zip":"String","PhoneNumber":"String"},"BillPayGroup":"Default","WalletData":{"Type":"String","EncryptedData":"String","ApplicationDataHash":"String","EphemeralPublicKey":"String","PublicKeyHash":"String","TransactionId":"String","Signature":"String","Version":"String","ApplicationData":"String","MerchantIdentifier":"String","SpecialPayment":"String","DigitalWalletIndicator":"Default"},"SecureData":{"CAVV":"String","SecureTransactionId":"String"},"Level2Data":{"TaxDetails":"Default","MerchantReferenceNumber":"String","MerchantTaxId":"String","OrderNumber":"String","TaxAmount":0,"DestinationPostalCode":"String","ProductDescription":"String"},"PaymentFacilitatorData":{"PaymentFacilitatorIndicator":"String","PFPhoneNumber":"String","SubMerchID":"String","SellerID":"String"},"TokenData":{"TokenType":"Default","TokenCryptogramData1":"String","TokenCryptogramData2":"String"},"OTPTranId":"String","CurrentShipment":0,"TotalShipments":0,"IsTokenRequested":false,"CardonFileIndicator":{"CardonFile":"Default","StoredCredentialIndicator":"Default","TransactionInitiate":"Default","ScheduleIndicator":"Default","NetworkTransactionId":"String"},"CardAccountUpdater":"Default","RetryAttemptCount":0,"TotalAuthAmount":0,"SignatureHashVersion":"String","OrderTypeDetail":"Default","BillPayGroupIndicator":{"MITTotalPaymentCount":"String","MITAmountType":"String","MITAmount":"String","MITUniqueID":"String","MITFrequency":"String","MITValidationFlag":"String","MITValidationReference":"String","MITSequenceIndicator":"String"},"ChargeTypeDetail":"Default","SAFEligible":"Default"}}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"ErrorMessage":"String","ErrorCode":"String","TranId":"String","Network":"String","ResponseCode":"String","NetworkResponseData":{"AliPayTransId":"String","AliPayTransactionTime":"String","ResponseCode":"String","WeChatPayTransId":"String","WeChatPayTransactionTime":"String","WeChatPayOpenId":"String"},"Timestamps":{"AppLayer":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"ParentLookup":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"RetryLookup":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"GetCardData":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"CardTokenize":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"CardEncrypt":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"DBInsert":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"BackendProcess":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"DBUpdate":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"ParentUpdate":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"Network":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"}}}