public void SaleTest() { _device.OnMessageSent += (message) => { Assert.IsNotNull(message); }; ITerminalResponse response = _device.Sale(5.12m) .WithPaymentMode(PaymentMode.MAILORDER) .WithCashBack(7.569m) .WithReferenceNumber(1) .Execute(); var authCode = response.AuthorizationCode; Assert.IsNotNull(response.AuthorizationCode); }
private void PrintReceipt(ITerminalResponse response) { String receipt = "x_trans_type=" + response.TransactionType; receipt += "&x_application_label=" + response.ApplicationLabel; receipt += "&x_masked_card=" + response.MaskedCardNumber; receipt += "&x_application_id=" + response.ApplicationId; receipt += "&x_cryptogram_type=" + response.ApplicationCryptogramType; receipt += "&x_application_cryptogram=" + response.ApplicationCryptogram; receipt += "&x_expiration_date=" + response.ExpirationDate; receipt += "&x_entry_method=" + response.EntryMethod; receipt += "&x_approval=" + response.ApprovalCode; receipt += "&x_transaction_amount=" + response.TransactionAmount; receipt += "&x_amount_due=" + response.AmountDue; receipt += "&x_customer_verification_method=" + response.CardHolderVerificationMethod; receipt += "&x_signature_status=" + response.SignatureStatus; receipt += "&x_response_text=" + response.ResponseText; Debug.WriteLine(receipt); }