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

确认订单

接口描述

URLindex.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

响应示例

{
    "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

接口描述

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

返回参数

参数名参数全称必选参数类型参数描述
continuecontinuetrueStringPAYPAL付款链接

调用示例

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

响应示例

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


联络我们

接口描述

URLindex.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

响应示例

{
    "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":[

    ]
}


关于我们

接口描述

URLindex.php?route=information/information/about
功能描述关于我们
返回格式Json,UTF8
HTTP请求方式GET

返回参数

参数名参数全称必选参数类型参数描述
imageimagetrueString图片
titletitletrueString标题
descriptiondescriptiontrueString描述

调用示例

index.php?route=information/information/about

响应示例

{
    "image":"image/catalog/0161117104731.png",
    "title":"关于我们",
    "description":"<p>描述描述描述描述描述描述描述描述<br></p>",
    "meta_title":"About Us",
    "meta_description":"",
    "meta_keyword":""
}


上一篇:解决firefox总是提示flash插件被拦截,要手动点击允许的问题,

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

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