alekstrust Posted January 24, 2019 Report Posted January 24, 2019 Hi, 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. Thanks.
Tyson Posted January 24, 2019 Report Posted January 24, 2019 You can use the client ID to fetch the billing contacts, e.g. <?php 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'); } } activa and alekstrust 2
alekstrust Posted January 29, 2019 Author Report Posted January 29, 2019 Awesome. That was easy. Thank you.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now