diff --git a/uafrica/Customshipping/Model/Carrier/Customshipping.php b/uafrica/Customshipping/Model/Carrier/Customshipping.php index 49c88c0db4bf725f35ed114060d40ea32e0ccfe0..447829269758e0ab411359858b19086b0d70889f 100644 --- a/uafrica/Customshipping/Model/Carrier/Customshipping.php +++ b/uafrica/Customshipping/Model/Carrier/Customshipping.php @@ -374,11 +374,12 @@ class Customshipping extends AbstractCarrier implements CarrierInterface */ private function getApiUrl(): string { - //return $this->getConfigData('api_url'); // return 'https://api.dev.ship.uafrica.com'; //Used for testing purposes only on localhost, since there is not endpoint to get magento rates to work with //Basically, I am using the structure of the response from the uAfrica API to test the functionality of the module + // return $this->getConfigData('rates_endpoint'); + return 'https://8390956f-c00b-497d-8742-87b1d6305bd2.mock.pstmn.io/putrates'; } diff --git a/uafrica/Customshipping/etc/adminhtml/system.xml b/uafrica/Customshipping/etc/adminhtml/system.xml index 7b5c5b85fd3dc414ce4da645a5840bd6ddd5dc20..28a9dbcc4a8c336e3f9ba6f7dcd2da8ec2e802d6 100644 --- a/uafrica/Customshipping/etc/adminhtml/system.xml +++ b/uafrica/Customshipping/etc/adminhtml/system.xml @@ -38,7 +38,7 @@ </section> <section id="carriers" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> <group id="uafrica" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> - <label>bobGo</label> + <label>uAfrica</label> <field id="version" translate="label" type="label" sortOrder="0" showInDefault="1" showInWebsite="0" showInStore="0"> <label>Version</label> @@ -133,8 +133,21 @@ <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> </field> <field id="access_token" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> - <label>BobGo Access Token</label> - <comment>The Access token you received from BobGo</comment> + <label>uAfrica Access Token</label> + <comment>The Access token you received from uAfrica</comment> + </field> + <field id="client_id" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>uAfrica Client ID</label> + <comment>The Client ID you received from uAfrica</comment> + </field> + <field id="client_secret" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>uAfrica Client Secret</label> + <comment>The Client Secret you received from uAfrica</comment> + </field> + <field id="rates_endpoint" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>uAfrica Rates</label> + <comment>Rates at check out collection Endpoint</comment> + </field> <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0">