in 5.3.3.4
1.I used this script in home page for displaying the siteid(k5BcYFhK)
<script data-siteid="k5BcYFhK" src="https://api.domain.com/js/customer-tracking/dev104.trackingdomain.comxcart53x_9d1d6.js" type="text/javascript">
</script>
2.I used this script in cart page for displaying the add to cart products
<script type="text/javascript">
//set cart total value
_cartstack.push(['setCartTotal', '{{ this.getTotalValue() }}']);
</script>
<script type="text/javascript">
//loop through items in cart and include here
{% for stackcart in this.getCartStack() %}
_cartstack.push(['setCartItem', {
'quantity':'{{ stackcart.getAmount() }}',
'productID':'{{ stackcart.getItemId() }}',
'productName':'{{ stackcart.getName() }}',
'productDescription':'{{ stackcart.getDescription() }}',
'productURL':'{{ stackcart.getURL() }}',
'productImageURL':'{{ stackcart.getImageURL() }}',
'productPrice':'{{ stackcart.getPrice() }}'
}]);
{% endfor %}
</script>
3.this is my question ?
Here is my code which i had used in xcart 4.6 & 4.7 version payment section. Please help me , where i need to use the code in xcart 5.3.3.4 version
// Setup the URL
$emailAddress = $userinfo['email'];
// required, get from session or db...
$cartTotal = $cart['total_cost']; // optional, more accurate reporting...
$url =
"
https://api.domaiin.com/ss/v1/?key=6cc64f627ae94113&siteid=k5BYYFZK&e
mail=".$emailAddress."&total=". $cartTotal;
// Initialize cURL...
$ch = curl_init();
// Set URL and Return directives...
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Send the request...
$jsonResponse = curl_exec($ch);
// Close cURL...
curl_close($ch);
// Handle JSON response...
$response = json_decode($jsonResponse, true);
// Successful call is response code 100...
if ($response['resp'] != "100"
{ /* Handle error responses, see "Response Codes" above... */ }