public async Task SaleAsync(string transactionId, ProcessRequestOptions options = null) { await this.ProcessInternalAsync(OperationSale, transactionId, options); }
public async Task AnnulAsync(string transactionId, ProcessRequestOptions options) { await this.ProcessInternalAsync(OperationAnnul, transactionId, options); }
private async Task ProcessInternalAsync(string operation, string transactionId, ProcessRequestOptions options = null) { var rb = new RequestBuilder(); var uri = rb.GetUri(this._endpoints.Process, new Dictionary <string, string> { { "merchantId", this._merchantId }, { "token", this._token }, { "transactionId", transactionId }, { "operation", operation } }, options ?? new ProcessRequestOptions()); var response = await this._caller.CallAsync <ProcessResponse>(uri); if (response.ResponseCode != "OK") { throw new ProcessException(response); } }