Hapi Middleman module to integrate between Intacct and PayPal. This package is meant to be installed with the generator application but can be installed manually as well.
Environment variables control the configuration of this plugin.
Required environment variables for ALL functionality.
Intacct Sender ID credential. Given by Intacct
Intacct Sender Password credential. Given by Intacct
Intacct User ID credential. From Intacct users
Intacct User Password credential. From Intacct users
Intacct Company ID. From Intacct
PayPal REST API Client ID. From developer.paypal.com
PayPal REST API Client Secret. From Intacct users
PayPal environment
Values: "sandbox" or "production"
URL to receive PayPal Webhooks. Must be https. The def
Value: Add /paypal/webhooks/listen to your hostname. Ex: https://example.com/paypal/webhooks/listen
Required environment variables for invoicing functionality
PayPal Merchant Email. This is required to be the email address associated with your REST client id.
The default Intacct account id to submit payments against. If a currency account is not setup it will automatically submit payments to this account.
Sets the date to start picking up invoices. Set this to your go live date. valid dates are MM/DD/YYYY
Optional environment variables for invoicing functionality
Biller first name that shows up on invoice
Biller last name that shows up on invoice
Biller business name that shows up on invoice
Biller phone country code that shows up on invoice
Default: 1
Biller phone number that shows up on invoice
Biller street address that shows up on invoice
Biller additional street address that shows up on invoice
Biller city address that shows up on invoice
Biller additional state address that shows up on invoice
2 character state
Biller zip code that shows up on invoice
Override the default intacct query for invoices to create.
Default: "RAWSTATE = 'A' AND (PAYPALINVOICESTATUS IS NULL OR PAYPALINVOICESTATUS NOT IN ('CANCELLED')) AND TOTALDUE NOT IN (0)"
Controls automatic creation of invoices. If false it will require that the PAYPALINVOICING checkbox be checked on the Intacct Custom field
Default: true
Controls the cron job for creating invoices. Anything that can be parsed by later package
Default: "every 1 hour"
Override the default intacct query for invoices to refund.
Default: "RAWSTATE = 'V' AND PAYPALINVOICESTATUS NOT IN ('REFUNDED', 'CANCELLED')"
Controls automatic refunding of invoices. If false it will require that the PAYPALINVOICING checkbox be checked on the Intacct Custom field
Default: true
Controls the cron job for refunding invoices. Anything that can be parsed by later package
Default: "every 1 hour"
he intacct account to submit payments of USD to. If set then PayPal invoices of type USD will go to this intacct account.
Intacct custom fields let you add your own fields on top of the existing Intacct object fields.
For the purpose of this integration, we just need to add custom fields for the invoice object.
Following are the custom fields you'll require to create under your Intacct account and link to invoice object:
- PayPal Invoice ID
- PAYPALERROR
- PAYPALINVOICEURL
- PAYPALINVOICESTATUS
- PAYPALINVOICING
This screenshot lists them along with their respective types:
-
Click on the Platform services tab, then under it find and click on Custom Fields
-
The following 4 steps will appear. Refer the below table for values at each step, for the custom fields we will end up creating.
In our case this will always be invoice
Custom Field Name | Data Type |
---|---|
PayPal Invoice ID | Text |
PAYPALERROR | Text Area |
PAYPALINVOICEURL | URL |
PAYPALINVOICESTATUS | Text |
PAYPALINVOICING | Check Box |
Custom Field Name | Label Value | Number of rows to display / Lenght / Default Value | Field ID | Description |
---|---|---|---|---|
PayPal Invoice ID | PayPal Invoice ID | 24 | PAYPALINVOICEID | PayPal Invoice ID |
PAYPALERROR | PAYPALERROR | 10 | PAYPALERROR | |
PAYPALINVOICEURL | PAYPALINVOICEURL | - | PAYPALINVOICEURL | |
PAYPALINVOICESTATUS | PAYPALINVOICESTATUS | 20 | PAYPALINVOICESTATUS | |
PAYPALINVOICING | PAYPALINVOICING | false | PAYPALINVOICING | Send a PayPal Invoice |
Custom Field Name | Field is required | Field is hidden | Field is inactive | Field Set | Show on page |
---|---|---|---|---|---|
PayPal Invoice ID | false | false | false | Custom Fields | |
PAYPALERROR | false | false | false | Custom Fields | |
PAYPALINVOICEURL | false | false | false | Custom Fields | |
PAYPALINVOICESTATUS | false | false | false | Custom Fields | |
PAYPALINVOICING | false | false | false | Custom Fields |
Hit Done button to save the custom field
Now whenever you successfuly create a new invoice in Intacct and view its details, you should see the following custom fields we just created: