Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
CaptureInputParameter Class
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.
1blng.CaptureInputParameter cip = new blng.CaptureInputParameter();
2cip.setPaymentAuthorization((blng__PaymentAuthorization__c)myrecord);
3cip.setAmount(4.23);
4cip.setAdditionalParameters(additionalParams);
5List<blng.CaptureInputParameter> lcip = new List<blng.CaptureInputParameter>();
6lcip.add(cip);
7List<blng.CaptureOutputResult> result = blng.TransactionAPI.captureTransaction(lcip);
8system.debug(result[0]);