verify
description: verify the discounted price and the checkout token. This should be used after getCoupon has been used and before the final checkout procedure. Intended to make sure that the discounted amounts or pricing has not changed since the getCoupon call.
Parameter | Type | Description | Required |
---|---|---|---|
api_token | string | API Token | YES |
coupon_code | string | Coupon Code | YES |
product_code | string | Product code or SKU | YES |
original_price | decimal | Original price of item | YES |
discounted_price | decimal | Discounted Amount from the Website | YES |
checkout_token | string | Token that was returned when using getCoupon call | YES |
Example usage:
1 2 3 4 5 6 7 8 9 10 11 |
require "codeBookie.php"; $codeBookie = new CodeBookie(); $couponCode = 'TESTCOUPON'; $productCode = 'PRODUCTCODE'; $orginalPrice = 29.99; $discountedPrice = 14.99; //checkout token is usually received after using the getCoupon API call $checkoutToken = 'CHECKOUTTOKEN'; $result = $codeBookie->verify($couponCode,$productCode,$originalPrice,$discountedPrice,$checkoutToken); |
Output variables:
Variable | Type | Description |
---|---|---|
status | string | can be VERIFIED or INVALID |
message | string | Message output |