Coder Social home page Coder Social logo

arjunshukla / hapi-middleman-paypal-intacct Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trainerbill/paypal-integrations-intacct

1.0 1.0 0.0 1.91 MB

Hapi Middleman module to integrate between Intacct and PayPal

License: MIT License

TypeScript 100.00%

hapi-middleman-paypal-intacct's Introduction

Build Status Coverage Status npm version Dependency Status devDependency Status MIT license

hapi-middleman-paypal-intacct

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

Environment variables control the configuration of this plugin.

Required Variables

Required environment variables for ALL functionality.

INTACCT_SENDER_ID

Intacct Sender ID credential. Given by Intacct

INTACCT_SENDER_PASSWORD

Intacct Sender Password credential. Given by Intacct

INTACCT_USER_ID

Intacct User ID credential. From Intacct users

INTACCT_USER_PASSWORD

Intacct User Password credential. From Intacct users

INTACCT_COMPANY_ID

Intacct Company ID. From Intacct

PAYPAL_CLIENT_ID

PayPal REST API Client ID. From developer.paypal.com

PAYPAL_CLIENT_SECRET

PayPal REST API Client Secret. From Intacct users

PAYPAL_MODE

PayPal environment
Values: "sandbox" or "production"

PAYPAL_WEBHOOK_HOSTNAME

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 Invoicing Variables

Required environment variables for invoicing functionality

PAYPAL_INVOICE_MERCHANT_EMAIL

PayPal Merchant Email. This is required to be the email address associated with your REST client id.

INTACCT_INVOICE_PAYMENT_DEFAULT_ACCOUNT

The default Intacct account id to submit payments against. If a currency account is not setup it will automatically submit payments to this account.

INTACCT_INVOICE_START_DATE

Sets the date to start picking up invoices. Set this to your go live date. valid dates are MM/DD/YYYY

Optional Invoicing Variables

Optional environment variables for invoicing functionality

PAYPAL_INVOICE_MERCHANT_FIRST_NAME

Biller first name that shows up on invoice

PAYPAL_INVOICE_MERCHANT_LAST_NAME

Biller last name that shows up on invoice

PAYPAL_INVOICE_MERCHANT_BUSINESS_NAME

Biller business name that shows up on invoice

PAYPAL_INVOICE_MERCHANT_PHONE_COUNTRY_CODE

Biller phone country code that shows up on invoice
Default: 1

PAYPAL_INVOICE_MERCHANT_PHONE_NUMBER

Biller phone number that shows up on invoice

PAYPAL_INVOICE_MERCHANT_ADDRESS_LINE1

Biller street address that shows up on invoice

PAYPAL_INVOICE_MERCHANT_ADDRESS_LINE2

Biller additional street address that shows up on invoice

PAYPAL_INVOICE_MERCHANT_ADDRESS_CITY

Biller city address that shows up on invoice

PAYPAL_INVOICE_MERCHANT_ADDRESS_STATE

Biller additional state address that shows up on invoice
2 character state

PAYPAL_INVOICE_MERCHANT_COUNTRY_POSTAL_CODE

Biller zip code that shows up on invoice

INTACCT_INVOICE_CREATE_QUERY

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)"

INTACCT_INVOICE_CREATE_AUTO

Controls automatic creation of invoices. If false it will require that the PAYPALINVOICING checkbox be checked on the Intacct Custom field
Default: true

INTACCT_INVOICE_CREATE_LATER

Controls the cron job for creating invoices. Anything that can be parsed by later package
Default: "every 1 hour"

INTACCT_INVOICE_REFUND_QUERY

Override the default intacct query for invoices to refund.
Default: "RAWSTATE = 'V' AND PAYPALINVOICESTATUS NOT IN ('REFUNDED', 'CANCELLED')"

INTACCT_INVOICE_REFUND_AUTO

Controls automatic refunding of invoices. If false it will require that the PAYPALINVOICING checkbox be checked on the Intacct Custom field
Default: true

INTACCT_INVOICE_REFUND_LATER

Controls the cron job for refunding invoices. Anything that can be parsed by later package
Default: "every 1 hour"

INTACCT_INVOICE_PAYMENT_USD_ACCOUNT

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

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: list of custom field with types

Creating Custom Fields in Intacct

  1. Click on the Platform services tab, then under it find and click on Custom Fields

  2. Click on the Add button click on the Add button

  3. The following 4 steps will appear. Refer the below table for values at each step, for the custom fields we will end up creating.

Step 1: Choose Object to Extend

In our case this will always be invoice

Step 2: Choose Field Data Type

Custom Field Name Data Type
PayPal Invoice ID Text
PAYPALERROR Text Area
PAYPALINVOICEURL URL
PAYPALINVOICESTATUS Text
PAYPALINVOICING Check Box

Step 3: Choose Text Area Field Characteristics

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

Step 4: Choose Deployment Options

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: new_nvoice_custom_fields

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.