#g4ppinv_getInvoiceStatus

      *//////////////////////////////////////////////////////////////*
      * #g4ppinv_getInvoiceStatus - Get Invoice Status               *
      *                                                              *
      * Output:                                                      *
      *   out_status - If the invoice is found, the status of the    *
      *     invoice.  Possible values are:                           *
      *     DRAFT, SENT, PAID, MARKED_AS_PAID, CANCELLED, REFUNDED,  *
      *     PARTIALLY_REFUNDED, UNPAID, MARKED_AS_REFUNDED, UNPAID,  *
      *     PAYMENT_PENDING                                          *
      *                                                              *
      *   out_errMsg - The error message (if error exists).          *
      *                                                              *
      * Returns:                                                     *
      *   -1 for error, 0 for no error.                              *
      *                                                              *
      * Settable Variables ([r]=required)                            *
      *   account - PayPal Account ID [r]                            *
      *   invoice_id - The PayPal Invoice ID you want to retrieve    *
      *     status for. [r]                                          *
      *   temporary_directory - Temporary directory to use for work  *
      *     files.  Default /tmp.                                    *
      *   reset - Reset Values After Call (*YES or *NO, Default *YES)*
      *   ccsid - The CCSID to use (1208)                            *
      *   debug - Turn on Debug (*NO, *YES)                          *
      *   debug_file - The debug file name.                          *
      *     (/tmp/g4pp_[account]_getInvoiceStatus)                   *
      *                                                              *
      *//////////////////////////////////////////////////////////////*
     D #g4ppinv_getInvoiceStatus...
     D                 PR            10i 0
     D  out_status                   64
     D  out_errMsg                  256    Options(*NOPASS)

#g4ppinv_getInvoiceStatus is used to retrieve the status of an invoice.

Returns: 0 for success, -1 for error.

Required Parameters:

  • Invoice Status (output) - The status of the invoice. The possible values are DRAFT, SENT, PAID, MARKED_AS_PAID, CANCELLED,REFUNDED, PARTIALLY_REFUNDED, UNPAID, MARKED_AS_REFUNDED, UNPAID, PAYMENT_PENDING

Optional Parameters:

  • Error Message (output) - Error message

Settable Variables:

  • account - PayPal Account ID (required)
  • invoice_id - The ID of the invoice (not the invoice number) of the invoice you want to retrieve the status for.

The following settable variables are the same as #g4gppinv_createInvoice except for the invoice number which is passed in as a parameter.

  • temporary_directory - Temporary directory to use for work files. Default /tmp.
  • reset - Reset Values After Call (*YES or *NO, Default *YES)
  • ccsid - The CCSID to use (1208)
  • debug - Turn on Debug (*NO, *YES, default *NO)
  • debug_file - The debug file name (default /tmp/g4pp_[account]_getInvoiceStatus)