#g4ppinv_updateInvoice

 *//////////////////////////////////////////////////////////////*
 * #g4ppinv_updateInvoice - Update an Invoice                   *
 *                                                              *
 * Input                                                        *
 *   in_invID - The ID of the invoice to update.                *
 *                                                              *
 * Input/Output                                                 *
 *   in_out_invFile - The fully qualified path and name of the  *
 *    JSON file that contains the invoice information as        *
 *    generated by PayPal.                                      *
 *    If this value is blank the filename and path will be      *
 *    automatically generated.                                  *
 *    NOTE: This file will only exist is the value for          *
 *    save_invoice_draft is set to true.                        *
 *                                                              *
 * Output:                                                      *
 *   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]                            *
 *   All remaining values are the same as                       *
 *     g4ppinv_createInvoice() except number which is passed    *
 *     in as a parameter.                                       *
 *                                                              *
 *//////////////////////////////////////////////////////////////*
D #g4ppinv_updateInvoice...
D                 PR            10i 0
D  in_invID                    256
D  in_out_invFile...
D                              256
D  out_errMsg                  256    Options(*NOPASS)

#g4ppinv_updateInvoice is used to update an existing draft or invoice. Note that this does not support partial updates. You must include all the new information for the invoice.

Returns: 0 for success, -1 for error.

Required Parameters:

  • Invoice ID (output) - The invoice ID that is returned from PayPal when the invoice draft is created.

Optional Parameters:

  • Invoice JSON File Name (input/output) - Specify a fully qualified path and filename for the JSON invoice data file. If you leave this blank a filename will be automatically generated. This field is only used if save_invoice_draft is set to *YES.
  • Error Message (output) - Error message

Settable Variables:

  • account - PayPal Account ID (required)

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]_createInvoice)