Created
July 12, 2014 08:13
-
-
Save sahildua2305/d47984bca5e506d247e4 to your computer and use it in GitHub Desktop.
Refiral Checkout Integration Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript">var showButton = false;</script> | |
<script type="text/javascript">var apiKey = "YOUR_API_KEY";</script> | |
<script type="text/javascript" src="//rfer.co/api/v0/js/all.js"></script> | |
<script type="text/javascript"> | |
var customer_name = "CUSTOMER_NAME"; // Replace CUSTOMER_NAME with the customer name | |
var customer_email = "CUSTOMER_EMAIL"; // Replace CUSTOMER_NAME with the customer email | |
var grandTotal = "GRAND_TOTAL"; // Replace GRAND_TOTAL with the total amount of the bill of customer | |
var subTotal = "SUBTOTAL"; // Replace SUBTOTAL with the subtotal amount of the bill of customer | |
var couponCode = "COUPON_CODE"; // Replace COUPON_CODE with the coupon code applied by customer. Leave it blank if no coupon code is applied. | |
// Push all products to refiral_cart_items array | |
var refiral_cart_items = []; | |
refiral_cart_items.push({ | |
product_id: "P1", // Product ID | |
quantity: "2", // Quantity | |
name: "Product 1", // Name of product | |
price: '250.0' // Price of product | |
}); | |
refiral_cart_items.push({ | |
product_id: "P2", // Item Product ID | |
quantity: "1", // Item Quantity | |
name: "Product 2", // Name of product | |
price: '400.0' // Price of product | |
}); | |
invoiceRefiral(subTotal, grandTotal, couponCode, refiral_cart_items, customer_name, customer_email); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment