Method RequestPayment
RequestPayment(OnlineEftposPaymentRequest)
Starts a payment transaction. Sends a request for payment to the API, which will be forwarded to the payer for approval.
Declaration
public Task<OnlineEftposPaymentStatus> RequestPayment(OnlineEftposPaymentRequest paymentRequest)
Parameters
Type | Name | Description |
---|---|---|
OnlineEftposPaymentRequest | paymentRequest | An instance of the OnlineEftposPaymentRequest class that provides details of the requested payment. |
Returns
Type | Description |
---|---|
Task<OnlineEftposPaymentStatus> | A task whose result is an instance of OnlineEftposPaymentStatus which describes the result of a successfully submitted payment. |
Remarks
Use the CheckPaymentStatus(String) method to obtain updated status information after the request has been submitted. Usually this is done in response to an HTTP callback from the API.
Exceptions
Type | Condition |
---|---|
OnlineEftposAuthenticationException | Thrown if a token cannot be obtained from the API. Usually this indicates incorrect credentials. |
OnlineEftposException | Thrown if an exception occurs or error information is returned from the API. |
See Also
RequestPayment(OnlineEftposPaymentRequest)
Starts a payment transaction. Sends a request for payment to the API, which will be forwarded to the payer for approval.
Declaration
public Task<OnlineEftposPaymentStatus> RequestPayment(OnlineEftposPaymentRequest paymentRequest)
Parameters
Type | Name | Description |
---|---|---|
OnlineEftposPaymentRequest | paymentRequest | An instance of the OnlineEftposPaymentRequest class that provides details of the requested payment. |
Returns
Type | Description |
---|---|
Task<OnlineEftposPaymentStatus> | A task whose result is an instance of OnlineEftposPaymentStatus which describes the result of a successfully submitted payment. |
Remarks
Use the CheckPaymentStatus(String) method to obtain updated status information after the request has been submitted. Usually this is done in response to an HTTP callback from the API.
Exceptions
Type | Condition |
---|---|
OnlineEftposAuthenticationException | Thrown if a token cannot be obtained from the API. Usually this indicates incorrect credentials. |
OnlineEftposException | Thrown if an exception occurs or error information is returned from the API. |