ricardo
1.0.0
Diglin ricardo .ch 原始碼是一個 PHP 函式庫,用於存取ricardo .ch API,這是一個發送 Json 或 SOAP 請求的 .NET Web 服務。使用這個函式庫我們只處理 json 請求。
首先,您必須在 PHP 包含路徑中包含要安裝此程式庫的程式庫資料夾的資料夾,然後設定自動載入器。以下是提供的自動載入器的範例:
require_once __DIR__ . '/src/SplAutoloader.php';
$autoload = new SplAutoloader(null, realpath(dirname(__DIR__) . '/src'));
$autoload->register();
將以下要求加入根項目層級的composer.json中。您不需要添加自動載入器,如果您的應用程式與其相容,Composer 將為您處理它。
{
"require" : {
"diglin/ ricardo ": "1.*"
},
"repositories" : [
{
"type": "vcs",
"url": "[email protected]:diglin/ ricardo .git"
}
]
}
在 Magento 專案層級的composer.json中,您必須設定以下資訊:
{
"require" : {
"magento-hackathon/magento-composer-installer" : "*",
"diglin/ ricardo ": "1.*"
},
"repositories" : [
{
"type" : "composer",
"url" : "http://packages.firegento.com"
},
{
"type": "vcs",
"url": "[email protected]:diglin/ ricardo .git"
}
],
"extra" : {
"magento-root-dir" : "./"
},
"scripts": {
"post-package-install": [
"Diglin\ ricardo \Composer\Magento::postPackageAction"
],
"post-package-update": [
"Diglin\ ricardo \Composer\Magento::postPackageAction"
],
"pre-package-uninstall": [
"Diglin\ ricardo \Composer\Magento::cleanPackageAction"
]
}
}
待辦事項
若要設定測試,請在tests/conf/config.ini中建立一個ini文件,其中包含以下內容: 注意,每種介面語言都需要兩種不同的配置。在測試期間,僅支援德語部分。所以只使用這個。
// 德語版本的ricardo API 設定(例如)
[GERMAN]
host = ws.betaqxl.com
partnership_key = YOUR_PARTNER_KEY
partnership_passwd = YOUR_PARTNER_PASS
partner_url = YOUR_WEBSITE_URL
allow_authorization_simulation = true
customer_username =
customer_password = ''
debug = true
display_test_content = true
[FRENCH]
host = ws.betaqxl.com
partnership_key = YOUR_PARTNER_KEY
partnership_passwd = YOUR_PARTNER_PASS
partner_url = YOUR_WEBSITE_URL
allow_authorization_simulation = true
customer_username =
customer_password = ''
debug = true
display_test_content = true