3

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

这是我发送的网址:

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 中弄清楚如何添加它?如果您可以附上我需要发送的网址?

4

1 回答 1

3

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

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

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) 使用覆盖价格。在这种情况下,无论目录价格如何,您都可以准确控制购物者获得多少折扣:

<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 美元的价格出售给您选择的购物者。

于 2017-06-28T05:12:07.350 回答