CaptureInputParameter Class

Receives the payment authorization record, payment capture amount, and an optional list of additional parameters from Salesforce Billing.

Namespace

blng

Example

In this example, t CaptureInputParameter receives the payment authorization record from Salesforce Billing, a payment capture amount of 4.23, and additional parameters. The parameters are stored in a list and sent to the TransactionAPI class, which performs the payment capture. The CaptureOutputResult class contains the result of the capture.

blng.CaptureInputParameter cip = new blng.CaptureInputParameter();
cip.setPaymentAuthorization((blng__PaymentAuthorization__c)myrecord);
cip.setAmount(4.23);
cip.setAdditionalParameters(additionalParams);
List<blng.CaptureInputParameter> lcip = new List<blng.CaptureInputParameter>();
lcip.add(cip);
List<blng.CaptureOutputResult> result = blng.TransactionAPI.captureTransaction(lcip);
system.debug(result[0]);

CaptureInputParameter Methods

The following are methods for CaptureInputParameter.

setPaymentAuthorization(paymentAuthorization)

Sets the ID of the payment authorization.

Signature

global static void setPaymentAuthorization(blng__PaymentAuthorization__c paymentAuthorization)

Parameters

paymentAuthorization
Type: blng__PaymentAuthorization__c
The payment authorization record from Salesforce Billing.

Return Value

Type: void

getPaymentAuthorization()

Returns the payment authorization record from Salesforce Billing.

Signature

global static blng__PaymentAuthorization__c getPaymentAuthorization()

Return Value

Type: blng__PaymentAuthorization__c

setAmount(amount)

Sets the amount of the payment capture.

Signature

global static void setAmount(Decimal amount)

Parameters

amount
Type: Decimal
The amount of the payment capture. Can be none, part, or all of the payment.

Return Value

Type: void

getAmount()

Returns the amount of the payment capture to be performed.

Signature

global static Decimal getAmount()

Return Value

Type: Decimal