Added check for invoice id

This fixes a bug where error messages returned from BitPay were passing the is_array() check and allowing the new invoice creation process to continue.