invoice.php 659 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. $app = require __DIR__ . '/app.php';
  3. /** @var \WeWork\Api\Invoice $invoice */
  4. $invoice = $app->get('invoice');
  5. try {
  6. $invoice->getInfo('CARDID', 'ENCRYPTCODE');
  7. } catch (Exception $e) {
  8. }
  9. try {
  10. $invoice->updateStatus('CARDID', 'ENCRYPTCODE', 'INVOICE_REIMBURSE_INIT');
  11. } catch (Exception $e) {
  12. }
  13. try {
  14. $invoice->updateStatusBatch('OPENID', 'INVOICE_REIMBURSE_INIT', [
  15. ['card_id' => 'CARDID', 'encrypt_code' => 'ENCRYPTCODE']
  16. ]);
  17. } catch (Exception $e) {
  18. }
  19. try {
  20. $invoice->getInfoBatch([
  21. ['card_id' => 'CARDID', 'encrypt_code' => 'ENCRYPTCODE']
  22. ]);
  23. } catch (Exception $e) {
  24. }