Failed to invoke method chargeInvoice in class com.infusionsoft.api.xmlrpc.XmlRpcInvoiceService: null

hi, help pls… we are getting: Failed to invoke method chargeInvoice in class com.infusionsoft.api.xmlrpc.XmlRpcInvoiceService: null
But the charge is going through in the InfusionSoft side. this has worked before, so I’m not sure why we are getting this error now

I think this is a know issue that is being worked on.

1 Like

Yes, this is a issue we are currently addressing, and hope to have the fix in this week’s deployment.

The root cause appears to be that Infusionsoft Payments requires more stringent attribute requirements: Both the email address and physical address must be set when generating the card id via “DataService.add” or attempting to charge it if the Infusionsoft Application has an Infusionsoft Payments account associated with it.

The error being returned is incorrect and not informative, but the behavior is correct: these fields need to be supplied.

1 Like

Thanks TomScott, we were able to solve the problem adding the following fields to the CreditCard array: ‘BillAddress1’, ‘BillCity’, ‘BillState’, ‘BillZip’, ‘Email’

So our code is now as follows:

//add credit card
$newCard = array(
  'ContactId' => $cid,
  'NameOnCard' => $_POST['ccName'],
  'CardNumber' => $_POST['ccNum'],
  'CardType' => $_POST['ccType'],
  'CVV2' => $_POST['ccCode'],
  'ExpirationMonth' => $_POST['ccMonth'],
  'ExpirationYear' => $_POST['ccYear'],
  'BillAddress1' => $_POST['Street'],
  'BillCity' => $_POST['City'],
  'BillState' => $_POST['State'],
  'BillZip' => $_POST['Zip'],
  'Email' => $_POST['email'],
);

$newCardId = $app->dsAdd('CreditCard',$newCard);