我正在使用BluesNap Shopper API来创建购物者表格:https://developers.bluesnap.com/v8976-extended/docs/create-shopper
这是我发送的URL:
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中弄清楚该如何添加?如果您可以连接我需要发送的URL?
您可以使用两种方法之一来确保您的购物者从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美元的购物者。