I have found it very useful to be able to link directly from an invoice to an online payment service of some kind. I’ve been doing this for quite some time with an amazing checkout cart service called FoxyCart. However, many people already use PayPal, which is widely available and easy to use.
In this article, I will show how to add a clickable PayPal image that will take your customer to a PayPal checkout page with most of the information already filled out.
Assumptions:
- You are using MoneyWorks version 6 or newer
- You already have a working invoice custom form
- You already have a PayPal account
- These instructions are Mac-specific
The PayPal Link
The link we must send to PayPal must follow a very specific format, as it will incorporate the information PayPal requires, as well as the resulting information from some MoneyWorks-specific operations. Here is an example PayPal link (note: this only works when generated by MoneyWorks, and will not work as-is):
"https://www.paypal.com/cgi-bin/webscr?business=name@email.com&cmd=_xclick¤cy_code=CAD&amount="+(Gross-AmtPaid)+"&item_name="+"Inovice No: "+OurRef
In theory, only two items need to be replaced from the link above:
- The PayPal email address you would like to use, by replacing the “name@email.com” email address with the email address linked to your PayPal account.
- The currency you would like to send invoices in, by replacing “CAD” with your currency code. PayPal has a list of currency codes here if you’re not sure of yours.
So, what to do with this long string of text? Essentially, we will:
- Insert it into a custom form, so that it calculates the values needed from the invoice (like invoice total, invoice number), and gives us a final link.
- Use the resulting link as a tooltip in a clickable image in an exported/emailed PDF.
Let’s go!
1) Open your custom form.
2) Using the “Calculation Box” tool, create a calculation box anywhere on the invoice. The Calculation Box will automatically open in edit mode.
3) In the Calculation field, paste the PayPal link below, like so:
"https://www.paypal.com/cgi-bin/webscr?business=name@email.com&cmd=_xclick¤cy_code=CAD&amount="+(Gross-AmtPaid)+"&item_name=" +"Inovice No: "+OurRef
4) Change the values for the necessary items (email address, currency)
5) Enter an arbitrary name (I’ve used “PayPal”) in the “Result” field.
6) Click “OK” to close the Calculation Box.
7) Right-click (or control-click) on the newly-created Calculation Box, and select “Visibility”.
8) Select “Always Invisible” (we don’t need to see this box on the invoice, we just need its calculation magic).
9) Using the “Picture” tool, add a PayPal image to your custom form, which will become the clickable image once the PDF is generated. Here’s one that I like.
10) While holding down the Option key, double-click the logo you just added, this will open the image properties box.
11) In the “Hot Link” field, enter the value: =PayPal
**Note: Remember to use whichever value you chose to use in the “Result” field of the calculation box.
12) Click “OK” to close the image properties box.
Now, whenever you create a PDF of an invoice, the PayPal image will be clickable, and automatically take your customer to your custom business PayPal checkout page with all information already pre-filled!