您可以使用以下两种方法之一来确保您的购物者从 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 美元的价格出售给您选择的购物者。