*/
public static function createRegistrationClient() {
$cxnStore = new \CRM_Cxn_CiviCxnStore();
- $client = new \Civi\Cxn\Rpc\RegistrationClient($cxnStore, \CRM_Cxn_BAO_Cxn::getSiteCallbackUrl());
+ $viaPort = defined('CIVICRM_CXN_VIA') ? CIVICRM_CXN_VIA : NULL;
+ $client = new \Civi\Cxn\Rpc\RegistrationClient(
+ $cxnStore, \CRM_Cxn_BAO_Cxn::getSiteCallbackUrl(), $viaPort);
$client->setLog(new \CRM_Utils_SystemLogger());
$client->setCertValidator(self::createCertificateValidator());
$client->setHttp(CRM_Cxn_CiviCxnHttp::singleton());