I would like to create a custom module, I want to get used to the vendor/magento/module-ups/
module, and use the same config in my custom module, such as userID, password, access key.
how can I include it in my custom module?
I want to get used to the below function in my custom module.
Please advise.
protected function setXMLAccessRequest()
{
$userId = $this->getConfigData('username');
$userIdPass = $this->getConfigData('password');
$accessKey = $this->getConfigData('access_license_number');
$this->_xmlAccessRequest = <<<XMLAuth
<?xml version="1.0" ?>
<AccessRequest xml:lang="en-US">
<AccessLicenseNumber>$accessKey</AccessLicenseNumber>
<UserId>$userId</UserId>
<Password>$userIdPass</Password>
</AccessRequest>
XMLAuth;
}