Jump to content

Get billing contact

Recommended Posts


How do I get the related billing contact from a contact id?

I'm in this method from NonmerchantGateway class:

public function buildProcess(array $contact_info, $amount, array $invoice_amounts=null, array $options=null) {}

$contact_info always have the current logged-in contact, I need the data of the billing contact.


Share this post

Link to post
Share on other sites

You can use the client ID to fetch the billing contacts, e.g.

public function buildProcess(array $contact_info, ...)
	Loader::loadModels($this, ['Contacts']);

  	if ($this->ifSet($contact_info['client_id'])) {
		// Fetch all billing contacts for this client
		$billing_contacts = $this->Contacts->getAll($contact_info['client_id'], 'billing');


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...