In Sage 200 Professional 2016, if you are using Opayo (formerly Sage Pay), you can use the Pay Now button on invoices, statements and chase letters that you send as PDF files by email. When your customer views the PDF document, they can click the Pay Now button to make a payment straight away through Opayo. How the Pay Now button worksThe Pay Now button is an embedded image with the following settings in Properties > Drill Down: - The Go to a web address taken from the report data option is selected.
- The web address is defined by an expression which uses the CreateSagePayButton function. This expression generates the Opayo website address when your customer clicks the image. The expression varies depending on the type of layout.
The expressions can't be changed to show different information, as this forms part of the website address generated.
The Pay Now buttons use conditional formatting to ensure they only appear on layouts when appropriate. The button doesn't appear on a layout if: - You aren't using one of the Sage Pay layouts or using a customised layout not originally created from a standard Sage Pay layout.
- The customer record is not set to the base currency.
- The layout is used to generate a Credit Note, Sales Order or Quotation.
- There is no balance due on an invoice or a statement.
- The document is saved as a file type other than PDF.
These are steps that explain how to add a Pay Now button and Opayo information to your statement or invoice. This article assumes that you have located the report or layout that you want to amend and opened it in Sage Report Designer. Read more > Obtain the Pay Now image fileThere are two image files available, if you right click on the one you would like to use and choose save picture as, then choose a relevant place to save it. Image 1 Image 2 - Scroll to the footer section of the layout.
- Add the Pay Now image to the layout.
a. Select Toolbox> Add Image/Logo b. Draw a box where you'd like the image to appear c. Choose to Browse my PC for an image and select the image saved on your PC - Select the image. From the Properties section, select Behaviour > Drill Down and click
- Select the Open a web page from the When this element is clicked drop-down list.
- Select Go to a web address taken from ... and click Edit. This opens the Expression Editor.
- Find the Pay Now functions: Functions > Sage200PayNow.
- Drag one of the following functions into the editor:
a. CreateSagePayButton. This function does not include the customer's address. Use this if your customer uses multiple invoice addresses. This just means that the customer address is not added automatically on the card details. Your customer just needs to manually enter their address with their card details. b. CreateSagePayButtonWithAddress. This function adds the customers address to the Opayo website. This uses the customers invoice address. When your customer makes a payment, their address is entered automatically, making their Pay Now experience easier. Use this when your customers only uses a single address. - Replace the place-holders with data fields.
a. Highlight the place-holder name, e.g. PaymentVendorName. b. Double click the corresponding field from the Fields section, e.g. SysCompanies > PaymentVendorName. This replaces the place-holder with the data field name: SYSCompanies.PaymentVendorName. c. Repeat for each place-holder as shown below:Place holder name | Choose fields or add text | Expression | Used for: |
---|
PaymentVendorName | SysCompanies > PaymentVendorName | SYSCompanies.PaymentVendorName | The name of your Opayo Vendor account entered in the Settings. Used to access your Opayo account. | customerRef | SLCustomerAccounts > CustomerAccountNumber | SLCustomerAccounts.CustomerAccountNumber | The customer account number. Used to match the payments with invoices in Sage 200. | address1 | SOPInvCredAddresses > AddressLine1 | SOPInvCredAddresses.AddressLine1 | The invoice address set on the order or invoice | address2 | SOPInvCredAddresses > AddressLine2 | SOPInvCredAddresses.AddressLine2 | Only required for WithAddress function. | address3 | SOPInvCredAddresses > City | SOPInvCredAddresses.City |
| address4 | SOPInvCredAddresses > County | SOPInvCredAddresses.County |
| address5 | SOPInvCredAddresses > Postcode | SOPInvCredAddresses.Postcode |
| country | SOPInvCredAddresses > Country | SOPInvCredAddresses.Country |
| InvoiceNumber | SOPInvoiceCredits > DocumentNo | SOPInvoiceCredits.DocumentNo | Adds the invoice number to the Opayo transaction | amount | SOPInvoiceCredits > InvoicedGrossValue | SOPInvoiceCredits.InvoicedGrossValue | The amount requested to pay. The customer can change this when entering their card details. | date | SOPInvoiceCredits > DocumentDate | SOPInvoiceCredits.DocumentDate | The invoice date. | currency | SLCustomerAccounts > CurrencyISOCode | SLCustomerAccounts.CurrencyISOCode | The currency the invoice is in. This will only be your base currency as the Pay Now button can't be used with foreign currency invoices. | format | Replace with the following text: "invoice" | "invoice" | Shows that it's an invoice that's being paid. | tenantID | SYSCompanies > TenantID | SYSCompanies.TenantID |
| companyID | SYSCompanies > CompanyNumber | SYSCompanies.CompanyNumber | Used to link the Opayo transaction to the correct Sage 200 company. | Your final expression should look like this Without Address:
CreateSagePayButton(SYSCompanies.PaymentVendorName, SLCustomerAccounts.CustomerAccountNumber, SOPInvoiceCredits.DocumentNo, SOPInvoiceCredits.InvoicedGrossValue, SOPInvoiceCredits.DocumentDate, SLCustomerAccounts.CurrencyISOCode, "invoice",SYSCompanies.TenantID, SYSCompanies.CompanyNumber) |
---|
With Address CreateSagePayButtonWithAddress(SYSCompanies.PaymentVendorName, SLCustomerAccounts.CustomerAccountNumber, SOPInvCredAddresses.AddressLine1, SOPInvCredAddresses.AddressLine2, SOPInvCredAddresses.City, SOPInvCredAddresses.County, SOPInvCredAddresses.Postcode, SOPInvCredAddresses.Country, SOPInvoiceCredits.DocumentNo, SOPInvoiceCredits.InvoicedGrossValue, SOPInvoiceCredits.DocumentDate, SLCustomerAccounts.CurrencyISOCode, "invoice",SYSCompanies.TenantID, SYSCompanies.CompanyNumber) |
---|
- Click Ok
- Save the layout in the relevant folder
If you are viewing this article from the Sage website, a list of Sage 200 Report Designer articles are available now.
|