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.

ProcessPaymentHandler Interface

Interface used to process payment requests.

Namespace

RichMessaging

ProcessPaymentHandler Methods

The following are methods for ProcessPaymentHandler.

processPaymentRequest(var1)

Processes a payment request.

Signature

public RichMessaging.ProcessPaymentResult processPaymentRequest(RichMessaging.ProcessPaymentRequest var1)

Parameters

ProcessPaymentHandler Example Implementation

This is an example implementation of the RichMessaging.ProcessPaymentHandler interface.

1global class MyProcessPaymentHandler implements Richmessaging.ProcessPaymentHandler {
2
3   global RichMessaging.ProcessPaymentResult processPaymentRequest(RichMessaging.ProcessPaymentRequest paymentRequest) {
4
5       // TODO: Reach out to your payment processor here and return success or failure based on the result of that request
6
7       return new RichMessaging.ProcessPaymentResult(RichMessaging.ProcessPaymentResultStatus.SUCCESS);
8   }
9}