Apex Classes

ElavonIntegration.apxc

Method

Return

Parameters

Description

Method

Return

Parameters

Description

setMock

void

ODataRequestMock mockRequest

Method used to call mock data for test purposes

createElavonRequest

ODataRequest

String endpoint, Boolean insertMessages, Boolean hasMultipleRequests

Starts an Elavon request. If the token has not been generated, it will generate in this instance.

buildAndAddApplication

Map<Boolean,String>

Id applicationId, TestingParameters testingParameters, Boolean insertMessages

Helper method called by the flow (Flow_BuildAndAddApplication) to start the application creation. This method aglomerates all the methods necessary to create the application, as well query definitions to the necessary objects.

getOfferPackages

GetOfferPackagesResponse

Id applicationId, String mcc, Boolean isPartOfMultipleRequests, Boolean insertMessages

Retrieves all available packages from Elavon. It is required that a mcc iso code is set to perform this request.

getEquipmentOffer

GetEquipmentOfferResponse

String equipmentOfferingRef, Boolean isPartOfMultipleRequests, Boolean insertMessages

Retrieves an equipament offer, based on the equipment offer reference, that can either be EQ_OFFER or AQ_ONLY.

getAcquiringOffer

GetAcquiringOfferResponse

String transactionPricingRef, Boolean isPartOfMultipleRequests, Boolean insertMessages

Retreives the aquiring offer based on the transaction price reference (40672)

addApplication

AddApplicationResponse

Application__c application, Merchant_Account__c merchantAccount, Account mainAccount, Contact mainContact, GetEquipmentOfferResponse equipmentOffer, GetAcquiringOfferResponse acquiringOffer, String packageRef, TestingParameters testingParameters, Boolean isPartOfMultipleRequests, Boolean insertMessages

Main method to create the application for Elavon. In the method, it is set all information related to merchants, outlets, and where is used the retrieved information from get_offer_packages, get_equipment_offer and get_acquiring_offer.

uploadDocument

UploadDocumentResponse

Id applicationId, String applicationReference, Boolean isPartOfMultipleRequests, Boolean insertMessages, String entityId, DocumentParameters params

Method used to deploy documents to Elavon. It is used to send proof documents (Id, Address, Business and Bank) as well for the signed application.

submitDocuments

Map<Boolean,String>

Id applicationId, String applicationReference, Boolean isPartOfMultipleRequests, String ownerRef, DocumentParameters params, Boolean insertMessages

Auxiliary method that is called by a flow apex class (Flow_SubmitDocuments).

submitApplication

SubmitApplicationResponse

Id merchantAccountId, String applicationReference, Boolean isPartOfMultipleRequests, Boolean insertMessages

Method that confirms the sumbission of an application to Elavon.

submitApplicationMap

Map<Boolean,List<String>>

Id applicationId, String applicationReference, Boolean isPartOfMultipleRequests, Boolean insertMessages

Auxiliary method that is called by a flow apex class (Flow_SubmitApplication).

applicationStatusCheck

ApplicationStatusCheckResponse

Id applicationId, String applicationReference, Boolean getSignerDetails, Boolean getApplicationDocuments, Boolean isPartOfMultipleRequests

Method that checks if the application status as changed and confirms if Elavon recieved correctly the application.

applicationStatusCheck

Map<String,List<String>>

Id applicationId, String applicationReference, Boolean isPartOfMultipleRequests

Auxiliary method that is called by a flow apex class (Flow_CheckApplicationStatus).

ElavonIntegrationTest.apxc

Method

Description

Method

Description

setupData

Data setup for the test class

testAddApplication_ReturnCode200

Test if the application creation was sucessfull

testAddApplication_ReturnCode400

Test the application creation errors

testAddApplication_PackageRef_BLINK_40672

Test if the application creation for the package reference BLINK_40672 was sucessfull

testAddApplication_PackageRef_TERMINAL_40672

Test if the application creation for the package reference TERMINAL_40672 was sucessfull

testSubmitApplication_ReturnCode200

Test if the submission of the application was sucessfull

testSubmitApplication_ReturnCode400

Test the submission of the application errors

testApplicationStatusCheck_ReturnCode200

Test if the application status call was sucessfull

testApplicationStatusCheck_ReturnCode400

Test the application status call errors

testUploadDocument_ReturnCode200

Test if the application document submission was sucessfull

testUploadDocument_ReturnCode200_WithMultipleFiles

Test if the application document submission of multiple documents was sucessfull

testUploadDocument_ReturnCode400

Test the application document submission errors

testGetOfferPackages_ReturnCode200

Test if the get offer package API call was sucessfull

testGetOfferPackages_ReturnCode400

Test the get offer package API call errors

testGetEquipmentOffer_ReturnCode200

Test if the get offer package API call was sucessfull

testGetEquipmentOffer_ReturnCode400

Test the get offer package API call errors

testGetAcquiringOffer_ReturnCode200

Test if the get aquiring offer API call was sucessfull

testGetAcquiringOffer_ReturnCode400

Test the get aquiring offer API call errors

Flow_BuildAndAddApplication.apxc

Description

Class called by the flow Elavon – Build and Add Elavon Application to create a new Elavon application

Variables

global class BuildAndAddApplicationRequests { @InvocableVariable global String applicationId; @InvocableVariable global String sortCode; @InvocableVariable global String accountNumber; @InvocableVariable global String regNumber; @InvocableVariable global String vat; @InvocableVariable global String offerPackRef; @InvocableVariable global String businessType; @InvocableVariable global String appCode; @InvocableVariable global String mmsc; @InvocableVariable global String chargebackFee; @InvocableVariable global String cardAcceptance; @InvocableVariable global String PCIPackage; @InvocableVariable global Boolean mktOptin; @InvocableVariable global Boolean fasterPayments; @InvocableVariable global Boolean amex; @InvocableVariable global Boolean elavonFee; @InvocableVariable global Boolean dcc; @InvocableVariable global Boolean vatAdded; @InvocableVariable global Boolean TetraDesk; @InvocableVariable global Boolean Poynt; @InvocableVariable global Boolean TetraMove; }
global class BuildAndAddApplicationResults { @InvocableVariable global Boolean result; @InvocableVariable global String errorMessage; @InvocableVariable global String ownerReference; @InvocableVariable global String applicationReference; }

Flow_SubmitDocuments.apxc

Description

Class called by the flow Elavon – Send Elavon Documents to submit all necessary documents to Elavon

Variables

global class SubmitDocumentsRequests { @InvocableVariable global String applicationId; @InvocableVariable global String applicationReference; @InvocableVariable global String ownerReference; @InvocableVariable global String applicationDocumentType; //DOC; APP; DD; SOF }

Flow_SubmitApplication.apxc

Description

Class called by the flow Elavon – Submit Application to submit the Elavon application

Variables

 

Flow_CheckStatusApplication.apxc

Description

Class called by the flow Elavon – Check Application Status to check the status of the Elavon application

Variables