Global Endpoints to perform Payment related transactions. BY Default, All transactions get processed through Spreedly. Virtual is provided so that the methods can be overridden and can skip the default functionality altogether.

Method Summary

Modifier and Type Method and Description
PaymentAPIService getInstance()
PaymentAPIService getInstance(String version)
void savePayMethod( EPayRequest ePayRequest )
void updatePayMethod( EPayRequest ePayRequest)
void verify( EPayRequest ePayRequest )
void remove( EPayRequest ePayRequest)
void getPaymentMethodTransactions( EPayRequest ePayRequest)
void connect( EPayRequest ePayRequest )
void connect()
void updateGateway( EPayRequest ePayRequest )
void disconnect( EPayRequest ePayRequest )
void getGatewayOptions()
void getGatewayTransactions( EPayRequest ePayRequest )
void getAccountTransactions()
void purchase( EPayRequest api)
void authorize( EPayRequest api)
void credit( EPayRequest api )
void generalCredit( EPayRequest api )
void cancel( EPayRequest ePayRequest )
void capture( EPayRequest api)
void read( EPayRequest ePayRequest )
void processTransaction()

Method Detail

This class supports the following methods:

global static PaymentAPIService getInstance()

Get Instance of PaymentAPIService.


global static PaymentAPIService getInstance(String version)

Get Instance of PaymentAPIService with a specific version.
Parameters

Name Type Description
version String undefined

global PaymentAPIService ()

PaymentAPIService Constructor that should not be called directly.


global virtual EPayResponse savePayMethod( EPayRequest ePayRequest )

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global virtual EPayResponse updatePayMethod( EPayRequest ePayRequest)

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global virtual EPayResponse verify( EPayRequest ePayRequest )

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global virtual EPayResponse remove( EPayRequest ePayRequest)

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global virtual EPayResponse getPaymentMethodTransactions( EPayRequest ePayRequest)

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global virtual EPayResponse connect( EPayRequest ePayRequest )

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global virtual EPayResponse connect()

Connect to a test gateway


global virtual EPayResponse updateGateway( EPayRequest ePayRequest )

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global virtual EPayResponse disconnect( EPayRequest ePayRequest )

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global virtual EPayResponse getGatewayOptions()

global virtual EPayResponse getGatewayTransactions( EPayRequest ePayRequest )

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global virtual EPayResponse getAccountTransactions()

global virtual EPayResponse purchase( EPayRequest api)

Parameters

Name Type Description
api EPayRequest undefined

global virtual EPayResponse authorize( EPayRequest api)

Parameters

Name Type Description
api EPayRequest undefined

global virtual EPayResponse credit( EPayRequest api )

Parameters

Name Type Description
api EPayRequest undefined

global virtual EPayResponse generalCredit( EPayRequest api )

Parameters

Name Type Description
api EPayRequest undefined

global virtual EPayResponse cancel( EPayRequest ePayRequest )

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global virtual EPayResponse capture( EPayRequest api)

Parameters

Name Type Description
api EPayRequest undefined

global virtual EPayResponse read( EPayRequest ePayRequest )

Parameters

Name Type Description
ePayRequest EPayRequest undefined

global static void processTransaction()

{ "type" : "Authorize", i.e. (Required) Transaction Type "payment_method_token" : "FOnWn7wBBej08isZvpW5RwUVtzn", i.e. (Required) Payment Method Token "gateway_token" : "LinS8FTkUQMXOb65iB1XUFnttDf", i.e. (Required) Gateway Token "currency_code" : "USD", i.e. (Required) Currency Code "description" : "Sales Order #00000123", i.e. (Optional) Description "order_id" : "0000123", i.e. (Optional) Order Name "amount" : 100000, i.e. (Required) API Amount "retain_on_success" : true i.e. (Optional) if the Payment Method needs to be retained. }