Payments
Process Payments
once created, payments are in the awaiting submission status the next step is setting them for collection by processing them collect using ecommerce urls every payment object has its own ecommerce urls these urls can be shared via email, embedded on web pages, or used in other online contexts to direct customers to a payment page in the context of the asperato package, these urls invoke the asperato paypage, allowing customers to securely enter their payment information when a new payment object is created, a unique data integrity token (dit) is generated and associated with that object this dit value is appended to the ecommerce url, providing an additional layer of security in this way, the url can only display details for the specific payment or authorisation it references dit was introduced in version 2 17 1 for new asperato package installations, this feature is enabled by default for existing clients upgrading the package, this feature is disabled by default however, we strongly recommend enabling it to enhance security this feature is controlled by a salesforce custom setting "enable pay/auth url data integrity " for more information, see v2 17 1 (autumn '21) docid 5ha6f0cnufjq3f0hdohe5 collect one off payments for simple one off payments without an authorisation (that require payment details to be entered), you can create a payment record specifying the amount and payment route options on the payment page you can then access the payment page via one of two ways if the customer is providing you with payment details as you are in the org (such as over the phone), then hit the “process payment” button on the top right of the screen, then enter the required details into the form if you wish to provide the customer with a link to the payment page that they can complete at their own convenience, copy the “ecommerce url” field and supply this to the customer (this might be via email or any other means) collect payment from authorisation process manually go to the asperato payments tab use the checkbox to select payment records click the process payments now button confirm you want to process the selected payments a notification will let you know how many were successful and errors go to the asperato payments tab find the payment and enter to its record page click the process payment from authorisation button on the action bar select the authorisation from the dropdown menu and review the payment details click process payment to finish process using flow you can use a salesforce flow to process a single payment immediately using the linked authorisation this flow can be invoked from code flow details api name asp04 process immediate payment required input paymentid sample code map\<string, object> params = new map\<string, object>(); string paymentid = 'a040c000003ptxaqam'; // replace with actual payment id params put('paymentid', paymentid); flow\ interview calcflow = new flow\ interview\ asp04 process immediate payment(params); calcflow\ start(); collect a payment and create an authorisation simultaneously many business cases require collecting an initial payment from a customer while simultaneously creating an authorisation for future transactions create a new payment record with the amount of the initial payment create a new authorisation record set the "authorisation" field on the payment record to the newly created authorisation process the payment using one of the following methods click the process payment button within salesforce share the ecommerce url link with the customer for self processing once the customer completes the payment process, both the payment and authorisation records will be updated with the transaction result the authorisation record can now be used for future payment collections as needed on demand processing of automated payments automated payments (payments linked to an authorisation) can be processed immediately with a button click instead of waiting for the scheduled job this allows for on demand processing, providing greater flexibility in managing payment collections how it works the "process payments now" button on the payments list view allows you to process payment collections quickly without waiting for the scheduled job simply select the desired payments from the list view and click the button the same criteria that apply to the "repeat payment scheduled job" also apply to the "process payments now" button a payment must have an in force authorisation attached be in awaiting submission status have a payment date of today or earlier setup to use the "process payments now" button, you must add it to the payment list view follow these steps in salesforce, navigate to setup > object manager locate and select the payment object ( asp04 payment c ) in the left hand navigation menu, click list view buttons click edit next to the list view you want to modify (or create a new list view) in the available buttons section, select process payments now and move it to the selected buttons section click save to apply the changes the process payments now button will now appear on your selected payment list view , allowing you to process eligible payments on demand collect payments automatically payments can be automatically collected against an existing authorisation by creating a payment record where the following conditions are true the payment record is set to “awaiting submission” the payment record is attached to an authorisation the attached authorisation's status is either “in force” or “pending” the payment record has a "due date" either today, or in the past the field value for "payment route selected" has a matching value on both records the payment and attached authorisation (v2 14+) an overnight batch job will run and attempt to collect any payments that fulfil these above criteria this payment record can be created manually as above however, more commonly in practice, it can also be created automatically as part of a lightning flow, process, apex trigger or any other method salesforce provides for automation