Paytram Free Usage

Charge Card subflow

  • Paytram is used with Screen Flows. There are no other components available to charge cards.

  • Paytram Free consists of 2 screen flows.

    • One flow can charge a card with the Authrorize.net Gateway

      • This flow is named ‘Paytram - Authorize.net - Charge Card’

      • This is a protected/locked Flow, and cannot be edited or opened. It is to be used as a subflow to make the transaction of the credit card charge. See below for sample usage.

    • The other Flow is a Sample flow (see below)

Sample Charge Card Screen Flow

  • Open the “Paytram - Authorize.net - SAMPLE Charge Card” Flow

  • Note the components necessary for typical operation of this flow. You can use this flow as a starting point to make your own flow (save a copy of it for use), or use the principles you learn from the Sample Flow to make your own flow from scratch.

The basic usage of the flow is

Inputting values

  • A screen element where card inputs and customer inputs can be filled out

    • Typically, you’d want to collect Cardholder name, address, email, and phone, but these are not required. (these fields can be prefilled using typical flow default values, often in conjunction with a Get Record component as a previous step, for example, to get the name, address, phone, and email values from a contact record).

    • You always need to have a field to input the amount to charge.

    • The screen will need to contain the special Custom Action ‘Secure Credit Card Input’ to display the card number, expiration, and CVV fields.

Making the Charge Transaction

  • The Subflow ‘Paytram - Authorize.net - Charge Card’ is what posts that actual transaction to Authorize.net, from the input values collected in the previous screen.

  • The below table shows the inputs that this subflow can receive and the values that can be used with it.

Input

Explanation

Typical Source of Value

Info_Amount

Amount to charge (required)

A screen that has an input for the end user to fill out, or is prefilled from a record (i.e. Opportunity Record)

Info_City

Cardholder Billing City (optional)

A screen that has an input for the end user to fill out, or is prefilled from a record (i.e. Contact Record)

Info_CreditCardToken

The encrypted credit card number and CVV form the secure credit card fields (required)

First Screen > Secure Card Input > Tokenized Card

Info_Email

Cardholder Email (optional)

A screen that has an input for the end user to fill out, or is prefilled from a record (i.e. Contact Record)

Info_ExpirationDate

The expiration date of the credit card from the the secure credit card fields (required)

First Screen > Secure Card Input > Expiry Date

Info_ExternalNamedCredential

The name of the External Credential created as part of the Configuration when Paytram was set up. (required)

This is static text of the name (not the label) of the External Credential. In the sample flow, the value is stored in a Flow Resource called ‘externalNamedCredential’. If you used the suggested naming convention ‘authorizeExternal’ recommended in the configuration documentation when creating the external credential, you don’t need to change anything for the sample flow to work. Otherwise, see below.

Info_FirstName

Cardholder First Name (required)

A screen that has an input for the end user to fill out, or is prefilled from a record (i.e. Contact Record)

Info_LastName

Cardholder Last Name (required)

A screen that has an input for the end user to fill out, or is prefilled from a record (i.e. Contact Record)

Info_NamedCredential

The name of the Named Credential created as part of the Configuration when Paytram was set up. (required)

This is static text of the name of the Named Credential. In the sample flow, the value is stored in a Flow Resource called ‘namedCredential’. If you used the suggested naming convention ‘authorize’ recommended in the configuration documentation when creating the named credential, you don’t need to change anything for the sample flow to work. Otherwise, see below.

Info_State

Cardholder Billing State (optional)

A screen that has an input for the end user to fill out, or is prefilled from a record (i.e. Contact Record)

Info_Street

Cardholder Billing Street (optional)

A screen that has an input for the end user to fill out, or is prefilled from a record (i.e. Contact Record)

Info_Zip

Cardholder Billing Zip Code (optional)

A screen that has an input for the end user to fill out, or is prefilled from a record (i.e. Contact Record)

Click done.

Named Credential and External Credential

  • The sample screenflow includes 2 resources called namedCredential externalNamedCredential. These are preset with the values, authorize and authorizeExternal, as mentioned above.

  • Ensure that these two constants in the Toolbox Manager are spelled correctly and are case-sensitive. If you named your named or external credential something else, update them here for the sample flow to work. If you are creating a new flow from scratch, we recommend storing the correct values in a Constant resource as well.

Transaction Response from Gateway

  • Transactions will always either be successful or error.

  • The result is stored in a flow variable called ‘WasError’ (Outputs from Authorize.net > Was Error) which is true or false (false = successful charge).

    • This field is useful to determine the next steps in the screenflow - for example to display an error screen or continue with the rest of the desired workflow.

  • 3 other values are set from the gateway response

    • Gateway Log Record

      • Each transaction whether successful or error creates a record log with details of the transaction

    • Transaction ID

      • If successful, the transaction ID is stored here

    • Error Message

      • If error, the complete error message from the gateway is stored here

A typical usage would be to have a decision resource in the screenflow after the processing is attempted to determine if it was successful or not.

  • If successful, a typical post process would be to display the transaction ID on a screen element, and have the flow continue by creating payment records on a custom object for you to record the payment. You can create these records, if desired, on any object you’d like by using the standard Flow Create Records element. We recommend storing a lookup to the gateway log record with the transaction id, date, and payment amount, among other fields.

  • If there is an error, you would likely want to display the error message to the user on a screen component.

    • In the Sample screenflow, if the processing errored, the original credit card input screen is viewed again, with the error message displayed on top. But you are able to display this error message anywhere you’d like.

Gateway Logs object

  • In AppLauncher select Gateway Logs

  • This object Displays a record of all the transactions that have occurred during credit card processing.

  • If you click on the individual transactions, it gives you information about each transaction.

Last updated