Skip to content

Payment-Specific Site Setup

The JustOn Self-Service Extension includes a payment page. Use this page to provide your users the option to complete their checkout process, directly paying for their purchases. To this end, the JustOn Self-Service Extension can integrate with payment service providers.

Info

This article describes how set up the payment page as part of the JustOn Self-Service Extension.

For details about integrating payment service providers, see Payment Provider Integration.

The common payment-specific setup tasks, which are required for any of the payment provider integrations, include:

Next steps:

Payment Provider Integration

Defining URL Rewriter Class

For the proper functioning of the payment page, you must set a URL rewriter for your site.

  1. Open the Site Edit page of your site.

    Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites. In the Sites list, click Edit in the row of the site.

  2. In the URL Rewriter Class field, specify URLRewriter.

  3. Click Save.

Defining JustOn Base URL

For the proper functioning of the payment page, you must define the new site's URL as the base URL for JustOn.

  1. Copy your new site's URL.

    Find the site URL on the Sites page. Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites.

  2. In Setup, open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  3. Click Manage in the row of Global Settings (for JustOn).

  4. Click Edit in the Default row.
  5. Paste the copied URL into the field Base URL.

    Make sure to end the Base URL entry with a trailing slash /.

  6. Click Save.

Assigning Payment-Specific Pages

You must add a number of Visualforce pages to expose the payment-specific functionality.

  1. Open the Site Details of your site.

    Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites. In the Sites list, click the label of the site to open its details.

  2. In the Site Visualforce Pages section, click Edit.

  3. Add the following common pages.

    • ONB2.InvoicePDF
    • ONBSE1.Payment
    • ONBSE1.PaymentResult
    • ONBSE1.PaymentProviderSetup
  4. Add the pages that are required for your payment provider integration.

    Provider Page
    PayPal ONBSE1.PaypalIPN
    ONBSE1.PaypalBuyerReturn
    Payeezy ONBSE1.PaymentPayeezy
    CyberSource ONBSE1.CyberSourceNotification
    ONBSE1.CyberSourceBuyerReturn
    Stripe ONBSE1.PaymentStripe
  5. Click Save.

Configuring Payment-Specific Public Access Settings

The payment support needs access to a number of standard objects and custom objects in order to work correctly. To this end, you must allow/restrict access both on object and field level.

Configuring General Object Permissions

  1. Open the Site Details of your site.

    Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites. In the Sites list, click the label of the site to open its details.

  2. Click Public Access Settings to open the site profile.

  3. In the Original Profile User Interface, click Edit.

    If you use the Enhanced Profile User Interface, click Object Settings > Object > Edit.

  4. Apply the following object permission settings.

    Standard Object Permissions

    Object Permissions
    Account Read

    Custom Object Permissions

    Object Permissions
    Balance Read
    Create
    Edit
    Script Read
    Create
    Edit
    Delete
    View All
    Modify All
    Session Read
    Create
    Edit
    Delete
    View All
    Modify All
    Style Read
  5. Click Save.

Note

All other objects must not be selected.

Configuring Field-Level Security

  1. Open the Site Details of your site.

    Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites. In the Sites list, click the label of the site to open its details.

  2. Click Public Access Settings to open the site profile.

  3. In the Original Profile User Interface, scroll to the Field-Level Security section, click View next to the object you want to modify, and then click Edit.

    If you use the Enhanced Profile User Interface, click Object Settings > Object > Edit.

  4. Specify the required access levels.

    Field-Level Security for Standard Objects

    Object Permissions
    Account Read access for all fields

    Field-Level Security for Custom Objects

    Object Permissions
    Balance Edit access for all fields
    Session Controlled by the general object permissions
    Script Controlled by the general object permissions
    Style Controlled by the general object permissions
  5. Click Save.

Configuring Apex Class Access Permissions

Your business may decide to use Stripe as a payment provider. If you do so, you must enable the Apex class ONBSE1.StripeWebhookHandler for your site in order to completely support the integration.

  1. Open the Site Details of your site.

    Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites. In the Sites list, click the label of the site to open its details.

  2. Click Public Access Settings to open the site profile.

  3. In the Original Profile User Interface, scroll to the Enabled Apex Class Access section, and then click Edit.

    If you use the Enhanced Profile User Interface, click Apex Class Access > Edit.

  4. Add ONBSE1.StripeWebhookHandler to the Enabled Apex Classes list.

  5. Click Save.

Configuring Payment-Specific Permission Set

Info

To apply this configuration, your site must be set active.

To successfully finish a payment, the site guest user needs additional permissions for a number of objects and fields. Due to restrictions in Salesforce, a part of the required permissions must be configured manually, others are already bundled in the permission set PaymentGuest, which is shipped with the JustOn Self-Service Extension.

Hence, enabling access for the site guest user usually involves the following tasks:

Creating Custom Permission Set

To create a custom permission set to allow accessing the Balance object as well as the Account and Contact objects:

  1. Create a new permission set.

    You can, for example, clone the PaymentGuest permission set, and then add the required additional permissions to the created copy.

    For details, see Create Permission Sets in the Salesforce Help.

  2. Configure the additional object settings in the new permission set.

    Click Object Settings > Object > Edit, and apply the following object permission settings.

    Object Permissions Notes
    Account Read
    Balance Read
    Create
    Edit
    Contact Read
    Invoice Read Required for invoice-specific payment configurations. Make sure that Read access to the PaymentProviderOverride field is enabled.

Assigning Permission Sets

To assign the required permission sets to the site guest user:

  1. Open the Site Details of your site.

    Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites. In the Sites list, click the label of the site to open its details.

  2. Click Public Access Settings to open the site profile.

  3. In the Original Profile User Interface, click View Users.

    If you use the Enhanced Profile User Interface, click Assigned Users.

  4. Open the details of the Site Guest User, and scroll to the Permission Set Assignments section.

  5. Click Edit Assignments.
  6. Select both the permission set PaymentGuest and the custom permission set created before, and click Add.
  7. Click Save.

Configuring Payment Page

The proper setup of the payment page requires additional configuration tasks:

Enabling Multi-Currency Support

Due to a Salesforce defect, the payment page may not display the correct currency symbol. If you have a single-currency org, the currency determined by the locale preference set in a user's browser overrules the default currency set on the org - which is not necessarily the currency you want to display to your customers. With multi-currency orgs, however, the browser settings do not affect the currency display.

Info

To ensure the correct currency display, JustOn recommends to enable multi-currency support for your org, even if you work with one currency only.

  1. In Setup, open Company Information.

    In Salesforce Lightning, navigate to Company Settings > Company Information.

    In Salesforce Classic, navigate to Company Profile > Company Information.

  2. Click Edit.

  3. Select Activate Multiple Currencies.
  4. Click Save.
  5. Open Manage Currencies.

    In Salesforce Lightning, navigate to Company Settings > Manage Currencies.

    In Salesforce Classic, navigate to Company Profile > Manage Currencies.

  6. Add, activate or deactivate currencies as necessary.

    For details about working with multiple currencies, see Manage Multiple Currencies in the Salesforce Help.

Enabling Access to Payment Page

Once the JustOn Self-Service Extension is properly set up to function with the payment page, JustOn creates a link to the payment page for a given invoice. You can include this link to your invoice email in order to redirect your users to the payment page.

To configure and use the payment page link:

Adjusting Payment Page Labels

The Visualforce pages packaged with the JustOn Self-Service Extension make use of custom labels. The custom labels can contain up to 1000 characters and can include HTML markup.

You can overwrite the custom labels to adjust them to the needs of your business use cases.

Note

To modify custom labels, you must enable the Translation Workbench. For details, see Enable and Disable the Translation Workbench in the Salesforce Help.

The payment page uses the following custom labels:

  • PayeezyWarnClose
  • PayeezyNoCvc
  • NoInvoiceAvailable
  • PaymentCancel
  • PaymentException
  • PaymentUseOtherPaypalPaymentOption
  • PaymentPaypalTokenTimedOut
  • PaymentSuccess
  • InvoiceSummary
  • DownloadPDF
  • InvoiceNo
  • InvoiceDate
  • InvoiceNet
  • InvoiceTax
  • InvoiceGrandTotal
  • InvoiceReceived
  • InvoicePaymentAmount
  • PayNow
  • Cancel
  • PaymentTeaser
  • PaymentFinePrint
  • PaymentOptions
  • PaymentAmount
  • CardNumber
  • CardIssuer
  • CvcHelp
  • Expires
  • CardHolder
  • PaymentFinePrintStripeCreditcard
  • PaymentFinePrintStripeSepa
  • PaymentFinePrintStripeAlipay

To modify them:

  1. In Setup, open the Custom Labels list.

    In Salesforce Lightning, navigate to User Interface > Custom Labels.

    In Salesforce Classic, navigate to Create > Custom Labels.

  2. Click the name of the label you want to modify.

    To better find the relevant labels, create a filter for the namespace ONBSE1.

  3. Click New Local Translations/Overrides.

  4. Select the target language and specify the text as required.
  5. Click Save.

Info

For help about modifying custom labels, see Create and Edit Custom Labels in the Salesforce Help.

Note

Set the locale in the global settings in order to select the intended translation.

Info

The custom labels PaymentFinePrintStripeCreditcard, PaymentFinePrintStripeSepa and PaymentFinePrintStripeAlipay are displayed when using Stripe as the payment provider. Make sure to provide an appropriate text for these labels before going live with Stripe. For example, the label PaymentFinePrintStripeSepa should show the SEPA mandate acceptance notification.

To customize your payment page, you can add a logo image.

  1. Create a corresponding style record.
  2. Set the Payment Page as the target page.
  3. Provide the following content:

    .content::before {
        content: url(<image_path>);
        display: block;
        text-align: center;
    }