App加Web项目 Opencart Api接口文档,简体版

確認訂單

接口描述

URL/index.php?route=checkout/confirm/api
功能描述確認訂單
返回格式Json,UTF8
HTTP請求方式POST

返回參數

參數名參數全稱必选參數類型參數描述
paymentpaymenttrueJSONArray/Bool付款說明
详细字段:payment
父字段字段必选字段类型字段描述
paymenttext_instructionfalseString標題

text_descriptionfalseString描述

text_paymentfalseString說明

bankfalseString转账事项

continuetrueString確認訂單鏈接

调用示例

/index.php?route=checkout/confirm/api

響應示例

{
    "success": true,
    "message": "",
    "products":[
        {
            "cart_id":"38",
            "product_id":"76",
            "name":"女士服裝",
            "model":"0",
            "option":[
                {
                    "name":"顏色",
                    "value":"粉紅"
                },
                {
                    "name":"尺寸",
                    "value":"Medium"
                }
            ],
            "recurring":"",
            "quantity":"1",
            "subtract":"1",
            "price":"HK $288.00",
            "total":"HK $288.00",
            "href":"/index.php?route=product/product/api&product_id=76"
        }
		......
    ],
    "totals":[
        {
            "title":"商品總額",
            "text":"HK $288.00"
        },
        {
            "title":"到本商店自取",
            "text":"HK $0.00"
        },
        {
            "title":"優惠券 (222aaa)",
            "text":"HK $-57.60"
        },
        {
            "title":"訂單總額",
            "text":"HK $230.40"
        }
    ],
	/*银行转账*/
    "payment":{
        "text_instruction":"银行转帐说明",
        "text_description":"请将总金额转入以下银行帐户。",
        "text_payment":"在我们收到付款之前,您的订单将不会运送。",
        "bank":"中國銀行 012-123456-001 付款後,請把收據 WhatsApp 傳送到 +852 2345 6789",
        "continue":"/index.php?route=extension/payment/bank_transfer/confirm"
    }
	/*PAYPAL*/
	"payment":{
        "continue":"/index.php?route=extension/payment/pp_express/checkoutapi"
    }
}


PAYPAL

接口描述

URL/index.php?route=extension/payment/pp_express/checkoutapi
功能描述PAYPAL付款
返回格式Json,UTF8
HTTP請求方式GET

返回參數

參數名參數全稱必选參數類型參數描述
continuecontinuetrueStringPAYPAL付款鏈接

调用示例

/index.php?route=extension/payment/pp_express/checkoutapi

響應示例

{
    "success": true,
    "message": "",
    "continue": "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=token&useraction=commit"
}


聯絡我們

接口描述

URL/index.php?route=information/contact/api
功能描述聯絡我們
返回格式Json,UTF8
HTTP請求方式POST

業務參數

參數名參數全稱必选參數类型參數描述
namenametrueString名稱
emailemailtrueString電郵
subjectsubjecttrueString主題
enquiryenquirytrueString內容

返回參數

參數名參數全稱必选參數類型參數描述
storestoretrueString商店名稱
addressaddresstrueString地址
geocodegeocodetrueString谷歌地圖鏈接
config_emailconfig_emailtrueString電郵
telephonetelephonetrueInt電話
faxfaxtrueInt傳真

调用示例

/index.php?route=information/contact/api

響應示例

{
    "success": true,
    "message": "",
    "store":"商店名稱",
    "address":"Address 1Address 1Address 1Address 1Address 1",
    "geocode":"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3691.487144753047!2d114.17427131495461!3d22.29740898532505!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zMjLCsDE3JzUwLjciTiAxMTTCsDEwJzM1LjMiRQ!5e0!3m2!1sen!2s!4v1475203837656",
    "geocode_hl":"zh-HK",
    "config_email":"admin@admin.com",
    "telephone":"123456789",
    "fax":"987654321",
    "open":"",
    "comment":"",
    "image":false,
    "locations":[

    ]
}


關於我們

接口描述

URL/index.php?route=information/information/about
功能描述關於我們
返回格式Json,UTF8
HTTP請求方式GET

返回參數

參數名參數全稱必选參數類型參數描述
imageimagetrueString圖片
titletitletrueString標題
descriptiondescriptiontrueString描述

调用示例

/index.php?route=information/information/about

響應示例

{
    "success": true,
    "message": "",
    "image":"/image/catalog/0161117104731.png",
    "title":"關於我們",
    "description":"<p>描述描述描述描述描述描述描述描述<br></p>",
    "meta_title":"About Us",
    "meta_description":"",
    "meta_keyword":""
}


上一篇:App加Web项目 Opencart Api接口文档,简体版

下一篇:PHP实现查询汉字笔画、笔画排序、笔画统计

评论列表
发表评论
称呼
邮箱
网址
验证码(*)
热评文章
相关阅读