Transactions to Secure Payment Application

Transactions to Secure Payment Application

To call the PayFacto payment application, a developer needs to create an Android intent.

JavaScript
Intent intent = new Intent("com.payfacto.terminal.payment.PAYMENT_ACTIVITY");

Additional data is required to complete the intent as explained in the following sections:

If one the the fields above is missing or invalid, a response will be received in the result data intent as the TERMINALERRORCODE extra data as a int.

The intent need to be call with the startActivityForResult function; for example, startActivityForResult(intent, 0);

Code Example

JavaScript
try { Intent intent = new Intent("com.payfacto.terminal.payment.PAYMENT_ACTIVITY"); switch ((int)spinner.getSelectedItemId()){ case 0: intent.putExtra("TRANSACTION", "SALE"); break; case 1: intent.putExtra("TRANSACTION", "REFUND"); break; case 2: intent.putExtra("TRANSACTION", "005"); break; case 3: intent.putExtra("TRANSACTION", "002"); break; case 4: intent.putExtra("TRANSACTION", "015"); break; case 5: intent.putExtra("TRANSACTION", "VOID"); break; case 6: intent.putExtra("TRANSACTION", "081"); break; case 7: intent.putExtra("TRANSACTION", "001"); break; case 8: intent.putExtra("TRANSACTION", "COMPLWOPA"); break; case 9: intent.putExtra("TRANSACTION", "CASH"); break; case 10: intent.putExtra("TRANSACTION", "080"); break; case 11: intent.putExtra("TRANSACTION", "AUTOSETTLE"); break; default: intent.putExtra("TRANSACTION", "SALE"); } switch ((int)spinnerLanguage.getSelectedItemId()) { case 0: intent.putExtra("MERCHLANG", "E"); break; case 1: intent.putExtra("MERCHLANG", "F"); break; } intent.putExtra("AMOUNT", etAmount.getText().toString()); intent.putExtra("TIP", etTip.getText().toString()); intent.putExtra("ORIGINALAMOUNT", etOriginalAmount.getText().toString()); intent.putExtra("INVOICE", etInvoice.getText().toString()); intent.putExtra("CLERK", etClerk.getText().toString()); intent.putExtra("AUTHCODE", etAuthCode.getText().toString()); intent.putExtra("PRINTDETAIL", swPrintDetail.isChecked()); intent.putExtra("PRINTSUMMARY", swPrintSummary.isChecked()); intent.putExtra("SENDHOST", swSendHost.isChecked()); intent.putExtra("SEQ", etSequence.getText().toString()); // for VOIDS and COMPLETION only startActivityForResult(intent, 0); Toast.makeText(getApplicationContext(), "Success",Toast.LENGTH_SHORT).show(); }catch(Exception e){ Toast.makeText(getApplicationContext(), "Fail",Toast.LENGTH_SHORT).show(); }
    • Related Articles

    • Example Calls to the Secure Payment Application

      This page lists code examples for the various Secure Payment transactions Purchase JavaScript Intent intent = new Intent("com.payfacto.terminal.payment.PAYMENT_ACTIVITY");   intent.putExtra("TRANSACTION", "SALE"); intent.putExtra("AMOUNT", "100"); // ...
    • SHC - Secure Hosted Checkout

      Secure Hosted Checkout What is Secure Hosted Checkout? Secure Hosted Checkout (SHC) is a JavaScript library that allows merchants to collect and send cardholder information to PayFacto for authorization (pre-authorization), purchase, or verification ...
    • API v1.0 - SHC - Secure Hosted Checkout

      About SHC What is Secure Hosted Checkout? Secure Hosted Checkout (SHC) is a JavaScript library that allows merchants to collect and send cardholder information to PayFacto for verification without needing to access that information directly. When ...
    • Hosted Payment Page

      Introduction This page aims to train future users of the secure redirection of the PayFacto payment solution. You will find in this page a description of the secure redirection service, the operation, the various call and return parameters, the ...
    • Payment Manager User Guide

      INTRODUCTION Foreword Due to the administrative interface, the client can control all transactions that are transmitted by its representatives or clients to the PayFacto server. With this tool the client can assigns users, who may then generate ...