首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >向bluesnap购物者请求添加折扣

向bluesnap购物者请求添加折扣
EN

Stack Overflow用户
提问于 2017-06-25 14:24:40
回答 1查看 125关注 0票数 3

我使用bluesnap购物者API来创建购物者表单:https://developers.bluesnap.com/v8976-Extended/docs/create-shopper

这是我发送的url:

代码语言:javascript
复制
https://sandbox.bluesnap.com/buynow/checkout?
storeId=xxxxx&
skinId=xxxx&
skuxxxxx=1&
currency=USD&
shopper.firstName=some_name&
shopper.lastName=some_lastName&
shopper.email=test_email@bla.com&
shopper.address1=Rotunda%20Drive&
shopper.city=Dearborn&
shopper.state=Mi&
shopper.zip=481201230&
shopper.phone=05444444&
shopper.country=us&
enc=xab1b2b4k55trtg
&sellerorderid=bs_xxx

它对我来说很有效。

现在,我想添加一个折扣字段,但是我不知道如何从购物者的API中添加它?如果你能附上我需要发送的网址?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-28 13:12:07

您可以使用以下两种方法之一来确保您的购物者从BlueSnap目录价格中获得购买折扣:

1)实现优惠券。将其存储在与您创建的购物者相关联的系统中。然后,使用orders web服务为具有折扣的购物者下订单:

代码语言:javascript
复制
https://ws.bluesnap.com/services/2/orders  POST

<order xmlns="http://ws.plimus.com">
  <ordering-shopper>
    <shopper-id>19575992</shopper-id> -- the shopper ID you prepared in advance
    <web-info>
      <ip>62.219.121.253</ip>
      <remote-host>www.merchant.com</remote-host>
      <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
    </web-info>
  </ordering-shopper>
  <cart>
    <cart-item>
      <sku>
        <sku-id>2152762</sku-id> -- a product that has catalog price of 10 usd
      </sku>
      <quantity>1</quantity>
    </cart-item>
    <coupons>
      <coupon>30-percent-off-code</coupon> -- the coupon code you made for the shopper.
    </coupons>
  </cart>
  <expected-total-price>
    <amount>7.00</amount> -- the price for this shopper after the discount
    <currency>USD</currency>
  </expected-total-price>
</order>

2)使用覆盖价格。在这种情况下,您可以精确地控制购物者获得多少折扣,而不考虑目录价格:

代码语言:javascript
复制
<order xmlns="http://ws.plimus.com">
  <ordering-shopper>
    <shopper-id>19575992</shopper-id>
    <web-info>
      <ip>62.219.121.253</ip>
      <remote-host>www.merchant.com</remote-host>
      <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
    </web-info>
  </ordering-shopper>
  <cart>
    <cart-item>
      <sku>
        <sku-id>2152762</sku-id>
        <sku-charge-price>
          <charge-type>initial</charge-type>
          <amount>7.00</amount>
          <currency>USD</currency>
        </sku-charge-price>
      </sku>
      <quantity>1</quantity>
    </cart-item>
  </cart>
  <expected-total-price>
    <amount>7.00</amount>
    <currency>USD</currency>
  </expected-total-price>
</order>

在这两种情况下,为其他任何人花费10美元的产品将以7美元的价格出售给您选择的购物者。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44743779

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档