Skip to main content
Skip table of contents

Update Payment Method Prompt in Community Hub

If your association uses stored payment methods, you can prompt constituents to update an inactive stored payment method after they log into Community Hub. This is especially useful if you've transitioned to the BluePay payment gateway and were unable to migrate existing stored payment methods from the legacy payment gateway. This recipe provides an example of creating a text card on the Personal Snapshot page in Community Hub that prompts constituents to browse to the My Payment Methods page and update their information.

Recipe Prep

Before completing this recipe, you first need to Enable Stored Payment Methods in Staff View and Community Hub.

The card you'll create contains a message with a link to the My Payment Methods Page. It only appears when all of a constituent's stored payment methods are linked to the legacy inactive payment gateway. If they have no stored payment methods or if they have at least one stored payment method linked to the BluePay payment gateway, the card does not appear.

To make this recipe, you should understand:

Ingredients

You will mix these ingredients together to make this recipe:

NameTypeDescription

Account - Has Only Inactive External Payment Profiles

QueryQueries inactive external payment profiles (stored payment methods) for the constituent currently logged into Community Hub.
Account - Only Inactive Ext Pay ProfileAccess ControlDisplays if the currently logged in Community Hub constituent has at least one inactive external payment profile (stored payment method).
Update Payment Method PromptCardDisplays a message and a link to constituents who have at least one inactive external payment profile (stored payment method).

Directions

  1. Create a query with the following values:

    FieldValue
    Query NameAccount - Has Only Inactive External Payment Profiles
    Sharing ModeUser
    SELECTId
    SObjectAccount
    WHERE
    CODE
    Id IN (SELECT NU__Account__c FROM NU__ExternalPaymentProfile__c
           WHERE
             NU__Account__c = {!CurrentAccountID} AND
             NU__PaymentGateway__r.NU__Status__c = 'Inactive') AND
    Id NOT IN (SELECT NU__Account__c FROM NU__ExternalPaymentProfile__c
               WHERE
                 NU__Account__c = {!CurrentAccountID} AND
                 NU__PaymentGateway__r.NU__Status__c = 'Active')
    LIMIT

    1

  2. Create an access control with the following values:

    FieldValue
    NameAccount - Only Inactive Ext Pay Profile
    ClassQueryConditional (NC)
    Query Record NameAccount - Has Only Inactive External Payment Profiles
    Is ActiveTRUE
  3. Create a card at the top of the Personal Snapshot page with the following values:

    FieldValue
    TypePlain Text 2
    NameUpdate Payment Method Prompt
    Access Control

    Account - Only Inactive Ext Pay Profile


    CSS Classm-card-as-alert alert-info
    Description LabelTo improve your online shopping experience, we have updated our payment services. Please go to <a href="/communityhub/mypaymentmethods">My Payment Methods</a> to add your payment method again.
    Card LayoutDisplay HTML

    The description label is just an example. You can change the text to match your association's style and voice.

    You may also need to update the URL in the <a> tag to ensure it goes to your association's My Payment Methods page.

  4. Since the query is using the User Sharing Mode, ensure that constituents have permission to view all payment gateway records, which are accessed in the query. This can be granted by updating the Community Hub Login User profile, editing the permissions for the Payment Gateway object, and selecting View All for the Object Permissions. 

  5. Log in to Community Hub as a constituent to ensure the card displays as expected:

    1. The constituent should be able to see the card when they only have a stored payment method(s) related to the inactive legacy payment gateway.

    2. Conversely, the card should be hidden when they either have no stored payment methods or they have at least one stored payment method that is related to the BluePay payment gateway.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.