Contents

Performing additional requests with credit / debit cards

 

The Trust Payments gateway uses request types to determine the actions that are to be performed during the payment session. A 3-D Secure payment will be processed by default, but you can include the typeDescriptions parameter in the Drop-In View Controller to specify additional actions to be performed.


let dropInVC = ViewControllerFactory.shared.dropInViewController(
	jwt: jwt,
	typeDescriptions: [.accountCheck],
	payButtonTappedClosureBeforeTransaction: { (controller: DropInController) in},
	successfulPaymentCompletion: {
		(
			jwt: String,
			responses: [JWTResponseObject],
			successMessage: String,
			cardReference: TPCardReference?
		)
	in},
	transactionFailure: {
		(
			jwt: String?,
			responses: [JWTResponseObject]?,
			errorMessage: String,
			error: NSError?
		)
	in}
)
let dropInVC = ViewControllerFactory.shared.dropInViewController(
	jwt: jwt,
	typeDescriptions: [.accountCheck, .auth],
	payButtonTappedClosureBeforeTransaction: { (controller: DropInController) in},
	successfulPaymentCompletion: {
		(
			jwt: String,
			responses: [JWTResponseObject],
			successMessage: String,
			cardReference: TPCardReference?
		)
	in},
	transactionFailure: {
		(
			jwt: String?,
			responses: [JWTResponseObject]?,
			errorMessage: String,
			error: NSError?
		)
	in}
)
let dropInVC = ViewControllerFactory.shared.dropInViewController(
	jwt: jwt,
	typeDescriptions: [.accountCheck, .subscription],
	payButtonTappedClosureBeforeTransaction: { (controller: DropInController) in},
	successfulPaymentCompletion: {
		(
			jwt: String,
			responses: [JWTResponseObject],
			successMessage: String,
			cardReference: TPCardReference?
		)
	in},
	transactionFailure: {
		(
			jwt: String?,
			responses: [JWTResponseObject]?,
			errorMessage: String,
			error: NSError?
		)
	in}
)
let dropInVC = ViewControllerFactory.shared.dropInViewController(
	jwt: jwt,
	typeDescriptions: [.accountCheck, .threeDQuery, .auth],
	payButtonTappedClosureBeforeTransaction: { (controller: DropInController) in},
	successfulPaymentCompletion: {
		(
			jwt: String,
			responses: [JWTResponseObject],
			successMessage: String,
			cardReference: TPCardReference?
		)
	in},
	transactionFailure: {
		(
			jwt: String?,
			responses: [JWTResponseObject]?,
			errorMessage: String,
			error: NSError?
		)
	in}
)
let dropInVC = ViewControllerFactory.shared.dropInViewController(
	jwt: jwt,
	typeDescriptions: [.auth],
	payButtonTappedClosureBeforeTransaction: { (controller: DropInController) in},
	successfulPaymentCompletion: {
		(
			jwt: String,
			responses: [JWTResponseObject],
			successMessage: String,
			cardReference: TPCardReference?
		)
	in},
	transactionFailure: {
		(
			jwt: String?,
			responses: [JWTResponseObject]?,
			errorMessage: String,
			error: NSError?
		)
	in}
)
let dropInVC = ViewControllerFactory.shared.dropInViewController(
	jwt: jwt,
	typeDescriptions: [.auth, .riskDec],
	payButtonTappedClosureBeforeTransaction: { (controller: DropInController) in},
	successfulPaymentCompletion: {
		(
			jwt: String,
			responses: [JWTResponseObject],
			successMessage: String,
			cardReference: TPCardReference?
		)
	in},
	transactionFailure: {
		(
			jwt: String?,
			responses: [JWTResponseObject]?,
			errorMessage: String,
			error: NSError?
		)
	in}
)
let dropInVC = ViewControllerFactory.shared.dropInViewController(
	jwt: jwt,
	typeDescriptions: [.auth, .subscription],
	payButtonTappedClosureBeforeTransaction: { (controller: DropInController) in},
	successfulPaymentCompletion: {
		(
			jwt: String,
			responses: [JWTResponseObject],
			successMessage: String,
			cardReference: TPCardReference?
		)
	in},
	transactionFailure: {
		(
			jwt: String?,
			responses: [JWTResponseObject]?,
			errorMessage: String,
			error: NSError?
		)
	in}
)
let dropInVC = ViewControllerFactory.shared.dropInViewController(
	jwt: jwt,
	typeDescriptions: [.riskDec, .auth],
	payButtonTappedClosureBeforeTransaction: { (controller: DropInController) in},
	successfulPaymentCompletion: {
		(
			jwt: String,
			responses: [JWTResponseObject],
			successMessage: String,
			cardReference: TPCardReference?
		)
	in},
	transactionFailure: {
		(
			jwt: String?,
			responses: [JWTResponseObject]?,
			errorMessage: String,
			error: NSError?
		)
	in}
)
let dropInVC = ViewControllerFactory.shared.dropInViewController(
	jwt: jwt,
	typeDescriptions: [.threeDQuery],
	payButtonTappedClosureBeforeTransaction: { (controller: DropInController) in},
	successfulPaymentCompletion: {
		(
			jwt: String,
			responses: [JWTResponseObject],
			successMessage: String,
			cardReference: TPCardReference?
		)
	in},
	transactionFailure: {
		(
			jwt: String?,
			responses: [JWTResponseObject]?,
			errorMessage: String,
			error: NSError?
		)
	in}
)
let dropInVC = ViewControllerFactory.shared.dropInViewController(
	jwt: jwt,
	typeDescriptions: [.threeDQuery, .auth],
	payButtonTappedClosureBeforeTransaction: { (controller: DropInController) in},
	successfulPaymentCompletion: {
		(
			jwt: String,
			responses: [JWTResponseObject],
			successMessage: String,
			cardReference: TPCardReference?
		)
	in},
	transactionFailure: {
		(
			jwt: String?,
			responses: [JWTResponseObject]?,
			errorMessage: String,
			error: NSError?
		)
	in}
)

 

The following request types can be included in the list specified in this parameter. Click the links provided below to learn more about how these request types can be utilised within your integration, and the corresponding requirements your system will need to adhere to when doing so:

Important: Only certain combinations of request types is supported. Ensure you follow the specifications listed below.

 

Request types Description
ACCOUNTCHECK Performs basic checks on the card and billing address details submitted.
Specification for use
AUTH Performs a payment, which debits funds from the customer’s account.
RISKDEC For processing requests to our Protect Plus system, for purposes of highlighting payments with suspicious characteristics.
Specification for use
SUBSCRIPTION Schedules an automated subscription in our subscription engine.
Specification for use
THREEDQUERY For querying a card’s 3-D secure enrolment status. This is required for 3-D Secure to be processed.