Shopping Cart Service

This module provides cloud persistent Shopping Cart Service. App Developers can use this service to create a shopping cart, add items and check out. This module also enables maintenance of transaction records and their corresponding payment status. The payment gateway interface is not provided by the platform. The App developer is free to choose how he wants to manage the payment integration. Shopping cart module can also be used along with Catalogue service to create an end-to-end Shopping feature for mobile and web Apps

Initialize

In order to use various the functions available in a specific API, a developer has to initialize with App42API by passing the apiKey and secretKey which will be created after the app creation from AppHQ dashboard.

Required Parameters

apiKey - The Application key given when the application was created. secretKey - The secret key corresponding to the application key given when the application was created.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
App42API.initialize("API_KEY","SECRET_KEY");
App42API.initialize("API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
Not Available
Coming Soon
Coming Soon
App42API.Initialize("API_KEY","SECRET_KEY");
App42API::initialize("API_KEY","SECRET_KEY");
Coming Soon
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")
App42API.initialize("API_KEY","SECRET_KEY"); 
Coming Soon

Build Service

After initialization, developer needs to call the buildXXXService method on App42API to get the instance of the particular API that you wish to build. For example, To build an instance of Cart Service, buildCartService() method needs to be called.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
CartService cartService = App42API.buildCartService(); 
CartService cartService = App42API.BuildCartService();  
CartService *cartService = [App42API buildCartService]; 
CartService cartService = App42API.buildCartService(); 
CartService cartService = App42API.buildCartService(); 
CartService cartService = App42API.BuildCartService(); 
Not Available
Coming Soon
Coming Soon
CartService cartService = App42API.BuildCartService(); 
$cartService = App42API::buildCartService();
Coming Soon
cart_service = api.build_cart_service()  
var cartService:CartService = App42API.buildCartService(); 
Coming Soon

Import Statement

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
 
import com.shephertz.app42.paas.sdk.android.App42API;
import com.shephertz.app42.paas.sdk.android.App42Response;
import com.shephertz.app42.paas.sdk.android.App42Exception;
import com.shephertz.app42.paas.sdk.android.App42BadParameterException;
import com.shephertz.app42.paas.sdk.android.App42NotFoundException;
import com.shephertz.app42.paas.sdk.android.shopping.Cart;
import com.shephertz.app42.paas.sdk.android.shopping.Cart.Payment;
import com.shephertz.app42.paas.sdk.android.shopping.CartService;
import com.shephertz.app42.paas.sdk.android.shopping.PaymentStatus;
using com.shephertz.app42.paas.sdk.windows;  
using com.shephertz.app42.paas.sdk.windows.shopping;   
#import "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"   
import com.shephertz.app42.paas.sdk.jme.App42API;
import com.shephertz.app42.paas.sdk.jme.App42Response;
import com.shephertz.app42.paas.sdk.jme.App42Exception;
import com.shephertz.app42.paas.sdk.jme.App42BadParameterException;
import com.shephertz.app42.paas.sdk.jme.App42NotFoundException;
import com.shephertz.app42.paas.sdk.jme.shopping.Cart;
import com.shephertz.app42.paas.sdk.jme.shopping.Cart.Payment;
import com.shephertz.app42.paas.sdk.jme.shopping.CartService;
import com.shephertz.app42.paas.sdk.jme.shopping.PaymentStatus;
import com.shephertz.app42.paas.sdk.java.App42API;
import com.shephertz.app42.paas.sdk.java.App42Response;
import com.shephertz.app42.paas.sdk.java.App42Exception;
import com.shephertz.app42.paas.sdk.java.App42BadParameterException;
import com.shephertz.app42.paas.sdk.java.App42NotFoundException;
import com.shephertz.app42.paas.sdk.java.shopping.Cart;
import com.shephertz.app42.paas.sdk.java.shopping.Cart.Payment;
import com.shephertz.app42.paas.sdk.java.shopping.CartService;
import com.shephertz.app42.paas.sdk.java.shopping.PaymentStatus;
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.shopping;  
Not Available
Coming Soon
Coming Soon
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.shopping;  
include_once '../CartService.php';
include_once '../App42Log.php';  
include_once '../App42Response.php';  
include_once '../App42Exception.php';   
include_once '../App42BadParameterException.php';  
include_once '../App42NotFoundException.php';  
Coming Soon
require 'App42_Ruby_API'
import com.shephertz.app42.paas.sdk.as3.App42API;
import com.shephertz.app42.paas.sdk.as3.App42Response;
import com.shephertz.app42.paas.sdk.as3.App42Exception;
import com.shephertz.app42.paas.sdk.as3.App42BadParameterException;
import com.shephertz.app42.paas.sdk.as3.App42NotFoundException;
import com.shephertz.app42.paas.sdk.as3.shopping.Cart;
import com.shephertz.app42.paas.sdk.as3.shopping.CartService;
import com.shephertz.app42.paas.sdk.as3.shopping.Item;
import com.shephertz.app42.paas.sdk.as3.shopping.Payment; 
Coming Soon

Create Cart

Creates a Cart Session for the specified User.

Required Parameters

userName - User for whom Cart Session has to be created returns The Cart Id with Creation Time. The id has to be used in subsequent calls for adding and checking out.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";    
cartService.createCart(userName, new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println("userName is " + cart.getUserName());  
	System.out.println("cartId is " + cart.getCartId());  
	System.out.println("Cart Session is"+cart.getCartSession());
	System.out.println("CreationTime is"+cart.getCreationTime());	
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String userName = "Nick";    
cartService.CreateCart(userName,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;     
		Console.WriteLine("userName is " + cart.GetUserName()); 
		Console.WriteLine("cartId is " + cart.GetCartId()); 
		String jsonResponse = cart.ToString();
	}  
}
NSString *userName = @"Nick";
Cart *cart = [cartService createCart:userName]; 
NSLog(@"userName is = %@" cart.userName);
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String userName = "Nick";	
Cart cart = cartService.createCart(userName); 
System.out.println("userName is " + cart.getUserName());
System.out.println("cartId is " + cart.getCartId());
String jsonResponse = cart.toString(); 
String userName = "Nick";	
Cart cart = cartService.createCart(userName); 
System.out.println("userName is " + cart.getUserName());  
System.out.println("cartId is " + cart.getCartId());  
System.out.println("Cart Session is"+cart.getCartSession());
System.out.println("CreationTime is"+cart.getCreationTime());	
String jsonResponse = cart.toString(); 
String userName = "Nick";    
App42Log.SetDebug(true);    	//Prints output in your editor console
cartService.CreateCart(userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Cart cart =  (Cart) response;   
		App42Log.Console("userName is :" + cart.GetUserName());
		App42Log.Console("cartId is :" + cart.GetCartId());
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String userName = "Nick";	
Cart cart = cartService.CreateCart(userName);     
Console.WriteLine("userName is " + cart.GetUserName()); 
Console.WriteLine("cartId is " + cart.GetCartId()); 
String jsonResponse = cart.ToString();
$userName = "Nick";						
$cart = $cartService->createCart($userName);
print_r("userName is " . $cart->getUserName());
print_r("cartId is " . $cart->getCartId());
print_r("Cart Session is".$cart->getCartSession());
print_r("CreationTime is".$cart->getCreationTime());
$jsonResponse = $cart->toString(); 
Coming Soon
user_name = "Nick";            
cart = cart_service.create_cart(user_name); /* returns the Cart object. */   
puts "userName is #{cart.user_name}";  
puts "cartId is #{cart.cart_id}";  
json_response = cart.to_s();
var userName:String = "Nick";     
cartService.createCart(userName, new callback());  
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());	
		trace("Cart Session is"+cart1.getCartSession());
		trace("CreationTime is"+cart1.getCreationTime());	
		trace("UserName is:"+cart1.getUserName());
	}
}
Coming Soon 

Get Cart Details

Fetch Cart details. Can be used by the App developer to display Cart Details i.e. Items in a Cart.

Required Parameters

cartId - The Cart Id that has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";	
cartService.getCartDetails(cartId, new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println("userName is :" + cart.getUserName());  
	System.out.println("cartId is :" + cart.getCartId());  
	System.out.println("State is :"+cart.getState());
	System.out.println("CreationTime is :"+cart.getCreationTime());
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
}); 
String cartId = "cartId";	
cartService.GetCartDetails(cartId,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;     
		Console.WriteLine("userName is " + cart.GetUserName()); 
		Console.WriteLine("cartId is " + cart.GetCartId()); 
		String jsonResponse = cart.ToString();
	}  
}
NSString *cartId = @"cartId";	
Cart *cart = [cartService getCartDetails:cartId]; 
NSLog(@"userName is = %@" cart.userName);
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String cartId = "cartId";	
Cart cart = cartService.getCartDetails(cartId); 
System.out.println("userName is " + cart.getUserName());
System.out.println("cartId is " + cart.getCartId());
String jsonResponse = cart.toString(); 
String cartId = "cartId";	
Cart cart = cartService.getCartDetails(cartId); 
System.out.println("userName is :" + cart.getUserName());  
System.out.println("cartId is :" + cart.getCartId());  
System.out.println("State is :"+cart.getState());
System.out.println("CreationTime is :"+cart.getCreationTime());
String jsonResponse = cart.toString(); 
String cartId = "cartId";    
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.GetCartDetails(cartId, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Cart cart =  (Cart) response;   
		App42Log.Console("userName is :" + cart.GetUserName());
		App42Log.Console("cartId is :" + cart.GetCartId());
        App42Log.Console("jsonResponse is :" + cart.ToString());
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";	
Cart cart = cartService.GetCartDetails(cartId);     
Console.WriteLine("userName is " + cart.GetUserName()); 
Console.WriteLine("cartId is " + cart.GetCartId()); 
String jsonResponse = cart.ToString();
$cartId = "cartId";					
$cart = $cartService->getCartDetails($cartId);
print_r("userName is " . $cart->getUserName());
print_r("cartId is " . $cart->getCartId());
print_r("State is :".$cart->getState());
print_r("CreationTime is".$cart->getCreationTime());
print_r("CheckOutTime is".$cart->getCheckOutTime());
$jsonResponse = $cart->toString(); 
Coming Soon
cart_id = "cartId";                     
cart = cart_service.get_cart_details(cart_id); /* returns the Cart object. */   
puts "userName is #{cart.user_name}";  
puts "cartId is #{cart.cart_id}";  
puts "state is #{cart.state}";  
json_response = cart.to_s();
var cartId:String = "cartId";  
cartService.getCartDetails(cartId,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());	
		trace("State is:"+cart1.getState());
		trace("CreationTime is"+cart1.getCreationTime());	
		trace("UserName is:"+cart1.getUserName());
	}
} 
Coming Soon 

Add Item

Adds an Item in the Cart with quantity and price. This method does not take currency. It’s the onus on the App developer to maintain the currency. It takes only the price.

Required Parameters

cartID - The Cart Id into which item has to be added. itemID - The Item id which has to be added to the cart. If the Catalogue Service is used along with the Cart Service then the Item ids should be same. itemQuantity - Quantity of the Item to be purchased. price - Price of the item.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";
String itemID = "itemID";
int itemQuantity = 12;
double price = 1000;
cartService.addItem(cartId, itemID, itemQuantity, price, new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println("cartId is : " + cart.getCartId());  
	ArrayList<Cart.Item> itemList =  cart.getItemList(); 
	for(int i=0;i<itemList.size();i++)
	{
		System.out.println("ItemId is "+itemList.get(i).getItemId());
		System.out.println("Price "+itemList.get(i).getPrice());
		System.out.println("Quantity "+itemList.get(i).getQuantity());
		System.out.println("Total Amount "+itemList.get(i).getTotalAmount());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
}); 
String cartId = "cartId";
String itemID = "itemID";
int itemQuantity = 12;
double price = 1000;	
cartService.AddItem(cartId,itemID,itemQuantity,price,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;     
		Console.WriteLine("cartId is " + cart.GetCartId()); 
		IList<Cart.Item> itemList =  cart.GetItemList(); 
		for(int i=0;i<itemList.Count;i++)
		{
			Console.WriteLine("ItemId is " + itemList[i].GetItemId());
			Console.WriteLine("Price " + itemList[i].GetPrice());
			Console.WriteLine("Quantity " + itemList[i].GetQuantity());
			Console.WriteLine("Total Amount " + itemList[i].GetTotalAmount());
		}
		String jsonResponse = cart.ToString();
	}  
}
NSString *cartId = @"cartId";	
NSString *itemID = @"itemID";
int itemQuantity = 12;
double price = 1000;
Cart *cart = [cartService addItem:cartId itemID:itemID itemQuantity:itemQuantity price:price]; 
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String cartId = "cartId";	
String itemID = "itemID";
int itemQuantity = 12;
double price = 1000;	
Cart cart = cartService.addItem(cartId,itemID,itemQuantity,price);
System.out.println("cartId is " + cart.getCartId());
for(int i=0; i<cart.getItemList().size(); i++)
{
    Cart.Item itemList = cart.getItemList().elementAt(i);
	System.out.println("ItemId is"+itemList.getItemId());
	System.out.println("Price "+itemList.getPrice());
	System.out.println("Quantity"+itemList.getQuantity());
	System.out.println("Total Amount"+itemList.getTotalAmount());
}
String jsonResponse = cart.toString(); 
String cartId = "cartId";	
String itemID = "itemID";
int itemQuantity = 12;
double price = 1000;	
Cart cart = cartService.addItem(cartId,itemID,itemQuantity,price); 
System.out.println("cartId is :" + cart.getCartId());  
ArrayList<Cart.Item> itemList =  cart.getItemList(); 
for(int i=0;i<itemList.size();i++)
{
	System.out.println("ItemId is"+itemList.get(i).getItemId());
	System.out.println("Price "+itemList.get(i).getPrice());
	System.out.println("Quantity"+itemList.get(i).getQuantity());
	System.out.println("Total Amount"+itemList.get(i).getTotalAmount());
}
String jsonResponse = cart.toString(); 
String cartId = "cartId";    
String itemID = "itemID";
int itemQuantity = 12;
double price = 1000;  
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.AddItem(cartId, itemID, itemQuantity, price, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
	{
		Cart cart =  (Cart) response;   
		App42Log.Console("cartId is :" + cart.GetCartId());
        App42Log.Console("jsonResponse is :" + cart.ToString());
		IList<Cart.Item> itemList =  cart.GetItemList(); 
		for(int i=0;i<itemList.Count;i++)
		{
			App42Log.Console("ItemId is " + itemList[i].GetItemId());
			App42Log.Console("Price " + itemList[i].GetPrice());
			App42Log.Console("Quantity " + itemList[i].GetQuantity());
			App42Log.Console("Total Amount " + itemList[i].GetTotalAmount());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";	
String itemID = "itemID";
int itemQuantity = 12;
double price = 1000;	
Cart cart = cartService.AddItem(cartId,itemID,itemQuantity,price);  
Console.WriteLine("cartId is " + cart.GetCartId());
	IList<Cart.Item> itemList =  cart.GetItemList(); 
	for(int i=0;i<itemList.Count;i++)
	{
		App42Log.Console("ItemId is " + itemList[i].GetItemId());
		App42Log.Console("Price " + itemList[i].GetPrice());
		App42Log.Console("Quantity " + itemList[i].GetQuantity());
		App42Log.Console("Total Amount " + itemList[i].GetTotalAmount());
	} 
String jsonResponse = cart.ToString();
$cartId = "cartId";	
$itemID = "itemID";
$itemQuantity = 12;
$price = 1000;					
$cart = $cartService->addItem($cartId,$itemID,$itemQuantity,$price);
print_r("cartId is : " .$cart->getCartId());
$list =  $cart->getItemList();
foreach($list as $itemList)
{
	print_r("ItemId is ".$itemList->getItemId());
	print_r("Price ".$itemList->getPrice());
	print_r("Quantity ".$itemList->getQuantity());
	print_r("Total Amount ".$itemList->getTotalAmount());
}
$jsonResponse = $cart->toString(); 
Coming Soon
cart_id = "cart_id";  
item_id = "item_id";  
item_quantity = 12;  
price = 1000;                          
cart = cart_service.add_item(cart_id, item_id, item_quantity, price); /* returns the Cart object. */  
puts "cartId is #{cart.cart_id}";  
itemList = Array.new();  
item_list = cart.get_item_list();  
for item in itemList do  
  puts "itemid is #{item.itemId}";  
  puts "quantity is #{item.quantity}";  
  puts "price is #{item.price}";  
  puts "totalAmount is #{item.totalAmount}";  
end  
json-response = cart.to_s();
var cartId:String = "cartId";  
var itemID:String = "itemID";  
var itemQuantity:int = 12;  
var price:int = 1000;  
cartService.addItem(cartId,itemID, itemQuantity, price,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());
		var itemList:Array = cart1.getItemList();
		if(itemList != null)
		{
			for(var p:int=0;p<itemList.length;p++)
			{
				var item:Item = Item(itemList[p]);
				trace("ItemId is"+item.getItemId());
				trace("Price "+item.getPrice());
				trace("Quantity"+item.getQuantity());
				trace("Total Amount"+item.getTotalAmount());
			}	
		}
	}
}
Coming Soon 

Get Items

Fetches the Items from the specified Cart.

Required Parameters

cartId - The cart id from which items have to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";	
cartService.getItems(cartId, new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println("cartId is :" + cart.getCartId());  
	ArrayList<Cart.Item> itemList =  cart.getItemList(); 
	for(int i=0;i<itemList.size();i++)
	{
		System.out.println("ItemId is"+itemList.get(i).getItemId());
		System.out.println("Price "+itemList.get(i).getPrice());
		System.out.println("Quantity"+itemList.get(i).getQuantity());
		System.out.println("Total Amount"+itemList.get(i).getTotalAmount());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String cartId = "cartId";	
cartService.GetItems(cartId,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;
		Console.WriteLine("cartId is " + cart.GetCartId()); 
		IList<Cart.Item> itemList =  cart.GetItemList(); 
		for(int i=0;i<itemList.Count;i++)
		{
			Console.WriteLine("ItemId is " + itemList[i].GetItemId());
			Console.WriteLine("Price " + itemList[i].GetPrice());
			Console.WriteLine("Quantity " + itemList[i].GetQuantity());
			Console.WriteLine("Total Amount " + itemList[i].GetTotalAmount());
		}
		String jsonResponse = cart.ToString();
	}  
}
NSString *cartId = @"cartId";	
Cart *cart = [cartService getItems:cartId];
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String cartId = "cartId";	
Cart cart = cartService.getItems(cartId); 
System.out.println("cartId is " + cart.getCartId());
for(int i=0; i<cart.getItemList().size(); i++)
{
    Cart.Item itemList = cart.getItemList().elementAt(i);
	System.out.println("ItemId is"+itemList.getItemId());
	System.out.println("Price "+itemList.getPrice());
	System.out.println("Quantity"+itemList.getQuantity());
	System.out.println("Total Amount"+itemList.getTotalAmount());
}
String jsonResponse = cart.toString(); 
String cartId = "cartId";	
Cart cart = cartService.getItems(cartId); 
System.out.println("cartId is :" + cart.getCartId());  
ArrayList<Cart.Item> itemList =  cart.getItemList(); 
for(int i=0;i<itemList.size();i++)
{
	System.out.println("ItemId is"+itemList.get(i).getItemId());
	System.out.println("Price "+itemList.get(i).getPrice());
	System.out.println("Quantity"+itemList.get(i).getQuantity());
	System.out.println("Total Amount"+itemList.get(i).getTotalAmount());
}
String jsonResponse = cart.toString(); 
String cartId = "cartId";
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.GetItems(cartId, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
		Cart cart =  (Cart) response;   
		App42Log.Console("cartId is :" + cart.GetCartId());
		IList<Cart.Item> itemList =  cart.GetItemList(); 
		for(int i=0;i<itemList.Count;i++)
		{
			App42Log.Console("ItemId is " + itemList[i].GetItemId());
			App42Log.Console("Price " + itemList[i].GetPrice());
			App42Log.Console("Quantity " + itemList[i].GetQuantity());
			App42Log.Console("Total Amount " + itemList[i].GetTotalAmount());
		}
        App42Log.Console("jsonResponse is :" + cart.ToString());
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";	
Cart cart = cartService.GetItems(cartId);     
Console.WriteLine("cartId is " + cart.GetCartId()); 
IList<Cart.Item> itemList =  cart.GetItemList(); 
for(int i=0;i<itemList.Count;i++)
{
	App42Log.Console("ItemId is " + itemList[i].GetItemId());
	App42Log.Console("Price " + itemList[i].GetPrice());
	App42Log.Console("Quantity " + itemList[i].GetQuantity());
	App42Log.Console("Total Amount " + itemList[i].GetTotalAmount());
} 
String jsonResponse = cart.ToString();
$cartId = "cartId";					
$cart = $cartService->getItems($cartId);
print_r("cartId is : " .$cart->getCartId());
$list =  $cart->getItemList();
foreach($list as $itemList)
{
	print_r("ItemId is ".$itemList->getItemId());
	print_r("Price ".$itemList->getPrice());
	print_r("Quantity ".$itemList->getQuantity());
	print_r("Total Amount ".$itemList->getTotalAmount());
}
$jsonResponse = $cart->toString(); 
Coming Soon
cart_id = "cart_id";                       
cart = cart_service.get_items(cart_id); /* returns the Cart object. */  
puts "cartId is #{cart.cart_id}";  
item_list = Array.new();  
item_list = cart.get_item_list();  
for item in item_list do  
  puts "itemid is #{item.item_id}";  
  puts "quantity is #{item.quantity}";  
  puts "price is #{item.price}";  
  puts "totalAmount is #{item.total_amount}";  
end  
json_response = cart.to_s();
var cartId:String = "cartId"; 
cartService.getItems(cartId,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());
		var itemList:Array = cart1.getItemList();
		if(itemList != null)
		{
			for(var p:int=0;p<itemList.length;p++)
			{
				var item:Item = Item(itemList[p]);
				trace("ItemId is"+item.getItemId());
				trace("Price "+item.getPrice());
				trace("Quantity"+item.getQuantity());
				trace("Total Amount"+item.getTotalAmount());
			}	
		}
	}
}
Coming Soon 

Get Item

Fetches the specified Item from the specified Cart.

Required Parameters

cartId - The cart id from which items have to be fetched. itemId - The item for which the information has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";	
String itemId = "itemId";	
cartService.getItem(cartId, itemId,new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println("cartId is :" + cart.getCartId());  
	ArrayList<Cart.Item> itemList =  cart.getItemList(); 
	for(int i=0;i<itemList.size();i++)
	{
		System.out.println("ItemId is"+itemList.get(i).getItemId());
		System.out.println("Price "+itemList.get(i).getPrice());
		System.out.println("Quantity"+itemList.get(i).getQuantity());
		System.out.println("Total Amount"+itemList.get(i).getTotalAmount());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String cartId = "cartId";
String itemId = "itemId";		
cartService.GetItem(cartId,itemId,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;
		Console.WriteLine("cartId is " + cart.GetCartId()); 
		IList<Cart.Item> itemList =  cart.GetItemList(); 
		Console.WriteLine("ItemId is " + itemList[0].GetItemId());
		Console.WriteLine("Price " + itemList[0].GetPrice());
		Console.WriteLine("Quantity " + itemList[0].GetQuantity());
		Console.WriteLine("Total Amount " + itemList[0].GetTotalAmount());
		String jsonResponse = cart.ToString();
	}  
}
NSString *cartId = @"cartId";
NSString *itemId = @"itemId";		
Cart *cart = [cartService getItem:cartId itemId:itemId];
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String cartId = "cartId";	
String itemId = "itemId";	
Cart cart = cartService.getItem(cartId,itemId); 
System.out.println("cartId is " + cart.getCartId());
Cart.Item itemList = cart.getItemList().elementAt(0);
System.out.println("ItemId is"+itemList.getItemId());
System.out.println("Price "+itemList.getPrice());
System.out.println("Quantity"+itemList.getQuantity());
System.out.println("Total Amount"+itemList.getTotalAmount());
String jsonResponse = cart.toString(); 
String cartId = "cartId";	
String itemId = "itemId";	
Cart cart = cartService.getItem(cartId,itemId); 
System.out.println("cartId is :" + cart.getCartId());  
ArrayList<Cart.Item> itemList =  cart.getItemList(); 
for(int i=0;i<itemList.size();i++)
{
	System.out.println("ItemId is"+itemList.get(i).getItemId());
	System.out.println("Price "+itemList.get(i).getPrice());
	System.out.println("Quantity"+itemList.get(i).getQuantity());
	System.out.println("Total Amount"+itemList.get(i).getTotalAmount());
}
String jsonResponse = cart.toString(); 
String cartId = "cartId";    
String itemId = "itemId";
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.GetItem(cartId,itemId, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
    	Cart cart =  (Cart) response;   
		App42Log.Console("cartId is :" + cart.GetCartId());
		IList<Cart.Item> itemList =  cart.GetItemList(); 
		App42Log.Console("ItemId is " + itemList[0].GetItemId());
		App42Log.Console("Price " + itemList[0].GetPrice());
		App42Log.Console("Quantity " + itemList[0].GetQuantity());
		App42Log.Console("Total Amount " + itemList[0].GetTotalAmount());
        App42Log.Console("jsonResponse is :" + cart.ToString());
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";
String itemId = "itemId";		
Cart cart = cartService.GetItem(cartId,itemId);
Console.WriteLine("cartId is " + cart.GetCartId()); 
IList<Cart.Item> itemList =  cart.GetItemList(); 
Console.WriteLine("ItemId is " + itemList[0].GetItemId());
Console.WriteLine("Price " + itemList[0].GetPrice());
Console.WriteLine("Quantity " + itemList[0].GetQuantity());
Console.WriteLine("Total Amount " + itemList[0].GetTotalAmount());
String jsonResponse = cart.ToString();
$cartId = "cartId";		
String itemId = "itemId";				
$cart = $cartService->getItem($cartId,$itemId);
print_r("cartId is : " .$cart->getCartId());
$list =  $cart->getItemList();
foreach($list as $itemList)
{
	print_r("ItemId is ".$itemList->getItemId());
	print_r("Price ".$itemList->getPrice());
	print_r("Quantity ".$itemList->getQuantity());
	print_r("Total Amount ".$itemList->getTotalAmount());
}
$jsonResponse = $cart->toString(); 
Coming Soon
cart_id = "cart_id";  
item_id = "item_id";      
cart = cart_service.get_item(cart_id,item_id); /* returns the Cart object. */  
puts "cartId is #{cart.cart_id}";  
item_list = Array.new();  
item_list = cart.get_item_list();  
for item in item_list do  
  puts "itemid is #{item.item_id}";  
  puts "quantity is #{item.quantity}";  
  puts "price is #{item.price}";  
  puts "totalAmount is #{item.total_amount}";  
end  
json_response = cart.to_s();
var cartId:String = "cartId";  
var itemID:String = "itemID"; 
cartService.getItem(cartId,itemID,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());
		var itemList:Array = cart1.getItemList();
		if(itemList != null)
		{
			for(var p:int=0;p<itemList.length;p++)
			{
				var item:Item = Item(itemList[p]);
				trace("ItemId is"+item.getItemId());
				trace("Price "+item.getPrice());
				trace("Quantity"+item.getQuantity());
				trace("Total Amount"+item.getTotalAmount());
			}	
		}
	}
}  
Coming Soon 

Is Empty

Checks whether the Cart is empty or not.

Required Parameters

cartId - The cart id to check for empty.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";	
cartService.isEmpty(cartId,new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println(cart);
	System.out.println("cartId is :" + cart.getCartId());  
	System.out.println("Is Empty :"+cart.isEmpty());
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String cartId = "cartId";	
cartService.IsEmpty(cartId,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;
		Console.WriteLine("cartId is " + cart.GetCartId()); 
		Console.WriteLine("Is Empty :"+cart.IsEmpty());
		String jsonResponse = cart.ToString();
	}  
}
NSString *cartId = @"cartId";	
Cart *cart = [cartService isEmpty:cartId];
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String cartId = "cartId";	
Cart cart = cartService.isEmpty(cartId); 
System.out.println("cartId is " + cart.getCartId());
System.out.println("Is Empty :"+cart.isEmpty());
String jsonResponse = cart.toString(); 
String cartId = "cartId";	
Cart cart = cartService.isEmpty(cartId); 
System.out.println(cart);
System.out.println("cartId is :" + cart.getCartId());  
System.out.println("Is Empty :"+cart.isEmpty());
String jsonResponse = cart.toString(); 
String cartId = "cartId";
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.IsEmpty(cartId, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Cart cart =  (Cart) response;   
		App42Log.Console("cartId is :" + cart.GetCartId());
		App42Log.Console("Is Empty :"+cart.IsEmpty());
        App42Log.Console("jsonResponse is :" + cart.ToString());
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";	
Cart cart = cartService.IsEmpty(cartId);     
Console.WriteLine("cartId is " + cart.GetCartId()); 
Console.WriteLine("Is Empty :"+cart.IsEmpty());
String jsonResponse = cart.ToString();
$cartId = "cartId";					
$cart = $cartService->isEmpty($cartId);
print_r("cartId is :" . $cart->getCartId());
print_r("Is Empty :".$cart->isEmpty());
$jsonResponse = $cart->toString(); 
Coming Soon
cart_id = "cart_id";                       
cart = cart_service.is_empty(cart_id); /* returns the Cart object. */   
puts "cartId is #{cart.cart_id}";   
json_response = cart.to_s(); 
var cartId:String = "cartId";
cartService.isEmpty(cartId,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());
	}
}
Coming Soon 

Checkout

Checks out the Cart and put it on Checkout Stage and returns the Transaction Id The transaction id has to be used in future to update the Payment Status.

Required Parameters

cartID - The cart id that has to be checked out.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";	
cartService.checkOut(cartId,new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println("cartId is :" + cart.getCartId()); 
	System.out.println("State is : "+cart.getState());
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String cartId = "cartId";	
cartService.CheckOut(cartId,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;
		Console.WriteLine("cartId is " + cart.GetCartId()); 
		Console.WriteLine("State is : "+cart.GetState());
		String jsonResponse = cart.ToString();
	}  
}
NSString *cartId = @"cartId";	
Cart *cart = [cartService checkOut:cartId];
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String cartId = "cartId";	
Cart cart = cartService.checkOut(cartId); 
System.out.println("cartId is : " + cart.getCartId());
System.out.println("State is : "+cart.getState());
String jsonResponse = cart.toString(); 
String cartId = "cartId";	
Cart cart = cartService.checkOut(cartId); 
System.out.println("cartId is :" + cart.getCartId()); 
System.out.println("State is:"+cart.getState());
String jsonResponse = cart.toString(); 
String cartId = "cartId";
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.CheckOut(cartId, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Cart cart =  (Cart) response;   
    	App42Log.Console("cartId is :" + cart.GetCartId());
		App42Log.Console("State is : "+cart.GetState());
        App42Log.Console("jsonResponse is :" + cart.ToString());
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";	
Cart cart = cartService.CheckOut(cartId);     
Console.WriteLine("cartId is " + cart.GetCartId()); 
Console.WriteLine("State is : "+cart.GetState());
String jsonResponse = cart.ToString();
$cartId = "cartId";					
$cart = $cartService->checkOut($cartId);
print("cartId is :" . $cart->getCartId());
print("State is : ".$cart->getState());
print("Total Amount is : ".$cart->getTotalAmount());
print("CheckoutTime is : ".$cart->getCheckOutDate());
$jsonResponse = $cart->toString(); 
Coming Soon
cart_id = "cart_id";          
cart = cart_service.check_out(cart_id); /* returns the Cart object. */   
puts "itemid is #{item.item_id}";  
puts "quantity is #{item.quantity}";  
puts "price is #{item.price}";  
puts "totalAmount is #{item.total_amount}";  
json_Response = cart.to_s();
var cartId:String = "cartId";
cartService.checkOut(cartId,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());
		trace("CheckOut Time"+cart1.getCheckOutDate());	
		trace("State is:"+cart1.getState());
	}
} 
Coming Soon 

Payment

Update Payment Status of the Cart. When a Cart is checked out, It is in Checkout state. The payment status has to be updated based on the Payment Gateway interaction.

Required Parameters

cartId - The cart id for which the payment status has to be updated. transactionId - Transaction Id for which the payment status has to be updated. paymentStatus - Payment Status to be updated. The probable values are PaymentStatus.DECLINED, PaymentStatus.AUTHORIZED, PaymentStatus.PENDING.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";	
String transactionId = "transactionId";	
cartService.payment(cartId, transactionId, PaymentStatus.AUTHORIZED,new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println("cartId is :" + cart.getCartId());  
	Cart.Payment payment=cart.getPayment();
	System.out.println("Transaction Id"+payment.getTransactionId());
	System.out.println("Total Amonut from payment node"+payment.getTotalAmount());
	System.out.println("Status"+payment.getStatus());
	System.out.println("Date"+payment.getDate());
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String cartId = "cartId";
String transactionId = "transactionId";	
cartService.Payment(cartId, transactionId, PaymentStatus.AUTHORIZED,new Callback()); 
public class Callback : App42Callback  
{   
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;
		Console.WriteLine("cartId is " + cart.GetCartId()); 
		Cart.Payment payment = cart.GetPayment();
		Console.WriteLine("Transaction Id"+payment.GetTransactionId());
		Console.WriteLine("Total Amount from payment node " + payment.GetTotalAmount());
		Console.WriteLine("Status " + payment.GetStatus());
		Console.WriteLine("Date " + payment.GetDate());
		String jsonResponse = cart.ToString();
	}  
}
NSString *cartId = @"cartId";
NSString *transactionId = @"transactionId";		
Cart *cart = [cartService payment:cartId transactionId:transactionId paymentStatus:@"AUTHORIZED"];
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String cartId = "cartId";	
String transactionId = "transactionId";	
Cart cart = cartService.payment(cartId,transactionId,PaymentStatus.AUTHORIZED); 
System.out.println("cartId is " + cart.getCartId());
Cart.Payment payment=cart.getPayment();
System.out.println("Transaction Id"+payment.getTransactionId());
System.out.println("Total Amount from payment node"+payment.getTotalAmount());
System.out.println("Status"+payment.getStatus());
System.out.println("Date"+payment.getDate());
String jsonResponse = cart.toString(); 
String cartId = "cartId";	
String transactionId = "transactionId";	
Cart cart = cartService.payment(cartId,transactionId,PaymentStatus.AUTHORIZED); 
System.out.println("cartId is :" + cart.getCartId());  
Cart.Payment payment=cart.getPayment();
System.out.println("Transaction Id"+payment.getTransactionId());
System.out.println("Total Amount from payment node"+payment.getTotalAmount());
System.out.println("Status"+payment.getStatus());
System.out.println("Date"+payment.getDate());
String jsonResponse = cart.toString(); 
String cartId = "cartId";    
String transactionId = "transactionId";
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.Payment(cartId, transactionId, PaymentStatus.AUTHORIZED, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Cart cart =  (Cart) response;   
        App42Log.Console("cartId is :" + cart.GetCartId());
		Cart.Payment payment = cart.GetPayment();
		App42Log.Console("Transaction Id"+payment.GetTransactionId());
		App42Log.Console("Total Amount from payment node " + payment.GetTotalAmount());
		App42Log.Console("Status " + payment.GetStatus());
		App42Log.Console("Date " + payment.GetDate());
        App42Log.Console("jsonResponse is :" + cart.ToString());
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";
String transactionId = "transactionId";		
Cart cart = cartService.Payment(cartId,transactionId,PaymentStatus.AUTHORIZED);
Console.WriteLine("cartId is " + cart.GetCartId()); 
Cart.Payment payment = cart.GetPayment();
Console.WriteLine("Transaction Id " + payment.GetTransactionId());
Console.WriteLine("Total Amount from payment node " + payment.GetTotalAmount());
Console.WriteLine("Status " + payment.GetStatus());
Console.WriteLine("Date " + payment.GetDate());
String jsonResponse = cart.ToString();
$cartId = "cartId";		
String transactionId = "transactionId";				
$cart = $cartService->payment($cartId,$transactionId,PaymentStatus::AUTHORIZED);
print_r("cartId is :" . $cart->getCartId());
$payment=$cart->getPayment();
print_r("Transaction Id".$payment->getTransactionId());
print_r("Total Amonut from payment node".$payment->getTotalAmount());
print_r("Status".$payment->getStatus());
print_r("Date".$payment->getDate());
$jsonResponse = $cart->toString(); 
Coming Soon
cart_id = "cart_id";  
transaction_id = "transaction_id";  
payment_status = AUTHORIZED;                         
cart = cart_service.payment(cart_id, transaction_id, payment_status); /* returns the Cart object. */   
puts "cartId is #{cart.cart_id}";  
puts "payment is #{cart.payment}";   
puts "transactionId is #{cart.transaction_id}";  
puts "totalAmount is #{cart.total_amount}";  
json_response = cart.to_s();
var cartId:String = "cartId";
var transactionId:String = "transactionId";     
cartService.payment(cartId,transactionId,PaymentStatus.AUTHORIZED,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());
		if(cart1.getPayment()!=null)
		{
			var payments1:Payment  = cart1.getPayment();
			trace("Transaction Id"+payments1.getTransactionId());
			trace("Total Amount from payment node"+payments1.getTotalAmount());
			trace("Status"+payments1.getStatus());
			trace("Date"+payments1.getDate());
		}
	}
} 
Coming Soon 

Get Payment By User

Fetches Payment information for a User. This can be used to display Order and Payment History.

Required Parameters

userName - Name of the for whom payment information has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
cartService.getPaymentsByUser(userName,new App42CallBack() {
public void onSuccess(Object response)
{
	ArrayList<Cart> cart = (ArrayList<Cart>)response;
	for(int i=0;i<cart.size();i++)
	{
		System.out.println("cartId is :" + cart.get(i).getCartId());  
		System.out.println("Transaction Id"+cart.get(i).getPayment().getTransactionId());
		System.out.println("Total Amount from payment node"+cart.get(i).getPayment().getTotalAmount());
		System.out.println("Status"+cart.get(i).getPayment().getStatus());
		System.out.println("Date"+cart.get(i).getPayment().getDate());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});  
String userName = "Nick";   
cartService.GetPaymentsByUser(userName, new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		IList<Cart> cart = (List<Cart>) response;   
		for(int i=0; i<cart.Count; i++)
		{
			Console.WriteLine("cartId is :" + cart[i].GetCartId());  
			Console.WriteLine("Transaction Id"+cart[i].GetPayment().GetTransactionId());
			Console.WriteLine("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
			Console.WriteLine("Status"+cart[i].GetPayment().GetStatus());
			Console.WriteLine("Date"+cart[i].GetPayment().GetDate());
		}
		String jsonResponse = cart[0].ToString();  
	}  
}  
NSString *userName = @"Nick";
NSArray *cart = [cartService getPaymentsByUser:userName]; 
NSLog(@"cartId is %@" , [[cart objectAtIndex:0] cartId]);
NSString *jsonResponse =[[cart objectAtIndex:0] toString]; 
String userName = "Nick";
Vector cart = cartService.getPaymentsByUser(userName); 
for(int i=0;i<cart.size();i++)
{
	System.out.println("cartId is :" + ((Cart)cart.elementAt(i)).getCartId());  
	System.out.println("Transaction Id "+((Cart)cart.elementAt(i)).getPayment().getTransactionId());
	System.out.println("Total Amount from payment node "+((Cart)cart.elementAt(i)).getPayment().getTotalAmount());
	System.out.println("Status "+((Cart)cart.elementAt(i)).getPayment().getStatus());
	System.out.println("Date "+((Cart)cart.elementAt(i)).getPayment().getDate());
}
String jsonResponse = ((Cart)cart.elementAt(0)).toString();    
String userName = "Nick";
ArrayList<Cart> cart = cartService.getPaymentsByUser(userName); 
for(int i=0;i<cart.size();i++)
{
	System.out.println("cartId is :" + cart.get(i).getCartId());  
	System.out.println("Transaction Id"+cart.get(i).getPayment().getTransactionId());
	System.out.println("Total Amount from payment node"+cart.get(i).getPayment().getTotalAmount());
	System.out.println("Status"+cart.get(i).getPayment().getStatus());
	System.out.println("Date"+cart.get(i).getPayment().getDate());
}
String jsonResponse = cart.get(0).toString();    
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.GetPaymentsByUser(userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        IList<Cart> cart =  (IList<Cart>) response;   
		   for(int i=0; i<cart.Count; i++)
			{
				App42Log.Console("cartId is :" + cart[i].GetCartId());  
				App42Log.Console("Transaction Id"+cart[i].GetPayment().GetTransactionId());
				App42Log.Console("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
				App42Log.Console("Status"+cart[i].GetPayment().GetStatus());
				App42Log.Console("Date"+cart[i].GetPayment().GetDate());
			}
        App42Log.Console("jsonResponse is :" + cart[0].ToString());
    }

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String userName = "Nick";
IList<Cart> cart = cartService.GetPaymentsByUser(userName); 
for(int i=0; i<cart.Count; i++)
	{
		Console.WriteLine("cartId is :" + cart[i].GetCartId());  
		Console.WriteLine("Transaction Id"+cart[i].GetPayment().GetTransactionId());
		Console.WriteLine("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
		Console.WriteLine("Status"+cart[i].GetPayment().GetStatus());
		Console.WriteLine("Date"+cart[i].GetPayment().GetDate());
	}
String jsonResponse = cart[0].ToString();         
$userName = "Nick";
$cartResponse = $cartService->getPaymentsByUser($userName); 
foreach($cartResponse as $cart)
{
	print_r("cartId is :" . $cart->getCartId());
	$payment=$cart->getPayment();
	print_r("Transaction Id".$payment->getTransactionId());
	print_r("Total Amonut from payment node".$payment->getTotalAmount());
	print_r("Status".$payment->getStatus());
	print_r("Date".$payment->getDate());
}
$jsonResponse = $cartResponse[0]->toString(); 
Coming Soon
user_id = "user_id";                            
cart_list = Array.new();  
cartList = cart_service.get_payments_by_user(user_id);/* returns the list of Cart object. */  
for cart in cart_list do  
  puts "cartId is #{cart.cart_id}";  
  puts "payment is #{cart.payment}";  
  puts "transactionId is #{cart.transaction_id}";  
  puts "totalAmount is #{cart.total_amount}";  
end  
json_response = cart_list.to_s();
var userName:String = "Nick";  
cartService.getPaymentsByUser(userName,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		if(response is Array)
		{
			trace("response is Array" + response);
			for(var i:int = 0;i < response.length;i++)
			{
				var cart:Cart = Cart(response[i])
				var payments:Payment  = cart.getPayment();
				trace("CartId is:"+cart.getCartId());
				if(cart.getPayment()!=null)
				{
					trace("Transaction Id"+payments.getTransactionId());
					trace("Total Amount from payment node"+payments.getTotalAmount());
					trace("Status"+payments.getStatus());
					trace("Date"+payments.getDate());
				}
			}
		}
	}
}
Coming Soon

Get Payment By Cart

Fetches Payment information for the specified Cart Id.

Required Parameters

cartId - Cart Id for which the payment information has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";	
cartService.getPaymentByCart(cartId,new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println("cartId is :" + cart.getCartId());  
	Cart.Payment payment=cart.getPayment();
	System.out.println("Transaction Id"+payment.getTransactionId());
	System.out.println("Total Amount from payment node"+payment.getTotalAmount());
	System.out.println("Status"+payment.getStatus());
	System.out.println("Date"+payment.getDate());
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});
String cartId = "cartId";	
cartService.GetPaymentByCart(cartId,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;
		Console.WriteLine("cartId is " + cart.GetCartId()); 
		Cart.Payment payment=cart.GetPayment();
		Console.WriteLine("Transaction Id "+payment.GetTransactionId());
		Console.WriteLine("Total Amount from payment node "+payment.GetTotalAmount());
		Console.WriteLine("Status "+payment.GetStatus());
		Console.WriteLine("Date "+payment.GetDate());
		String jsonResponse = cart.ToString();
	}  
}
NSString *cartId = @"cartId";	
Cart *cart = [cartService getPaymentByCart:cartId];
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String cartId = "cartId";	
Cart cart = cartService.getPaymentByCart(cartId); 
System.out.println("cartId is " + cart.getCartId());
Cart.Payment payment=cart.getPayment();
System.out.println("Transaction Id"+payment.getTransactionId());
System.out.println("Total Amount from payment node"+payment.getTotalAmount());
System.out.println("Status"+payment.getStatus());
System.out.println("Date"+payment.getDate());
String jsonResponse = cart.toString(); 
String cartId = "cartId";	
Cart cart = cartService.getPaymentByCart(cartId); 
System.out.println("cartId is :" + cart.getCartId());  
Cart.Payment payment = cart.getPayment();
System.out.println("Transaction Id"+payment.getTransactionId());
System.out.println("Total Amount from payment node"+payment.getTotalAmount());
System.out.println("Status"+payment.getStatus());
System.out.println("Date"+payment.getDate());
String jsonResponse = cart.toString(); 
String cartId = "cartId";    
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.GetPaymentByCart(cartId, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Cart cart =  (Cart) response;   
        App42Log.Console("cartId is :" + cart.GetCartId());
		Cart.Payment payment=cart.GetPayment();
		App42Log.Console("Transaction Id "+payment.GetTransactionId());
		App42Log.Console("Total Amount from payment node "+payment.GetTotalAmount());
		App42Log.Console("Status "+payment.GetStatus());
		App42Log.Console("Date "+payment.GetDate());
        App42Log.Console("jsonResponse is :" + cart.ToString());
    }

    public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";	
Cart cart = cartService.GetPaymentByCart(cartId);     
Console.WriteLine("cartId is " + cart.GetCartId()); 
Cart.Payment payment=cart.GetPayment();
Console.WriteLine("Transaction Id "+payment.GetTransactionId());
Console.WriteLine("Total Amount from payment node "+payment.GetTotalAmount());
Console.WriteLine("Status "+payment.GetStatus());
Console.WriteLine("Date "+payment.GetDate());
String jsonResponse = cart.ToString();
$cartId = "cartId";					
$cart = $cartService->getPaymentByCart($cartId);
print_r("cartId is :" . $cart->getCartId());
$payment=$cart->getPayment();
print_r("Transaction Id".$payment->getTransactionId());
print_r("Total Amonut from payment node".$payment->getTotalAmount());
print_r("Status".$payment->getStatus());
print_r("Date".$payment->getDate());
$jsonResponse = $cart->toString(); 
Coming Soon
cart_id = "cart_id";
cart = cart_service.get_payment_by_cart(cart_id);/* returns the list of Cart object. */  
for cart in cart_list do  
  puts "cartId is #{cart.cart_id}";  
  puts "payment is #{cart.payment}";  
  puts "transactionId is #{cart.transaction_id}";  
  puts "totalAmount is #{cart.total_amount}";  
end  
json_response = cart_list.to_s();
var cartId:String = "cartId";
cartService.getPaymentByCart(cartId,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());
		if(cart1.getPayment()!=null)
		{
			var payments1:Payment  = cart1.getPayment();
			trace("Transaction Id"+payments1.getTransactionId());
			trace("Total Amount from payment node"+payments1.getTotalAmount());
			trace("Status"+payments1.getStatus());
			trace("Date"+payments1.getDate());
		}
	}
}
Coming Soon 

Get Payment By User And Status

Fetches Payment information based on User Id and Status.

Required Parameters

userName - Name of the user for whom payment information has to be fetched. paymentStatus - Status for which type of payment information has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
cartService.getPaymentsByUserAndStatus(userName, PaymentStatus.AUTHORIZED,new App42CallBack() {
public void onSuccess(Object response) 
{
	ArrayList<Cart> cart = (ArrayList<Cart>)response;
	for(int i=0;i<cart.size();i++)
	{
		System.out.println("cartId is :" + cart.get(i).getCartId());  
		System.out.println("Transaction Id"+cart.get(i).getPayment().getTransactionId());
		System.out.println("Total Amount from payment node"+cart.get(i).getPayment().getTotalAmount());
		System.out.println("Status"+cart.get(i).getPayment().getStatus());
		System.out.println("Date"+cart.get(i).getPayment().getDate());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});   
String userName = "Nick";   
cartService.GetPaymentsByUserAndStatus(userName,PaymentStatus.AUTHORIZED, new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		IList<Cart> cart = (List<Cart>) response;   
		for(int i=0; i<cart.Count; i++)
		{
			Console.WriteLine("cartId is :" + cart[i].GetCartId());  
			Console.WriteLine("Transaction Id"+cart[i].GetPayment().GetTransactionId());
			Console.WriteLine("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
			Console.WriteLine("Status"+cart[i].GetPayment().GetStatus());
			Console.WriteLine("Date"+cart[i].GetPayment().GetDate());
		}
		String jsonResponse = cart[0].ToString();  
	}  
}  
NSString *userName = @"Nick";
NSArray *cart = [cartService getPaymentsByUserAndStatus:userName paymentStatus:@"AUTHORIZED"]; 
NSLog(@"cartId is %@" , [[cart objectAtIndex:0] cartId]);
NSString *jsonResponse =[[cart objectAtIndex:0] toString]; 
String userName = "Nick";
Vector cart = cartService.getPaymentsByUserAndStatus(userName,PaymentStatus.AUTHORIZED); 
for(int i=0;i<cart.size();i++)
{
	System.out.println("cartId is :" + ((Cart)cart.elementAt(i)).getCartId());  
	System.out.println("Transaction Id "+((Cart)cart.elementAt(i)).getPayment().getTransactionId());
	System.out.println("Total Amount from payment node "+((Cart)cart.elementAt(i)).getPayment().getTotalAmount());
	System.out.println("Status "+((Cart)cart.elementAt(i)).getPayment().getStatus());
	System.out.println("Date "+((Cart)cart.elementAt(i)).getPayment().getDate());
}
String jsonResponse = ((Cart)cart.elementAt(0)).toString();    
String userName = "Nick";
ArrayList<Cart> cart = cartService.getPaymentsByUserAndStatus(userName,PaymentStatus.AUTHORIZED); 
for(int i=0;i<cart.size();i++)
{
	System.out.println("cartId is :" + cart.get(i).getCartId());  
	System.out.println("Transaction Id"+cart.get(i).getPayment().getTransactionId());
	System.out.println("Total Amount from payment node"+cart.get(i).getPayment().getTotalAmount());
	System.out.println("Status"+cart.get(i).getPayment().getStatus());
	System.out.println("Date"+cart.get(i).getPayment().getDate());
}
String jsonResponse = cart.get(0).toString();    
String userName = "Nick"; 
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.GetPaymentsByUserAndStatus(userName,PaymentStatus.AUTHORIZED, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        IList<Cart> cart =  (IList<Cart>) response;   
        for(int i=0; i<cart.Count; i++)
		{
			App42Log.Console("cartId is :" + cart[i].GetCartId());  
			App42Log.Console("Transaction Id"+cart[i].GetPayment().GetTransactionId());
			App42Log.Console("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
			App42Log.Console("Status"+cart[i].GetPayment().GetStatus());
			App42Log.Console("Date"+cart[i].GetPayment().GetDate());
		}
        App42Log.Console("jsonResponse is :" + cart[0].ToString());
    }

    public void OnException(Exception e)
    {
		App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String userName = "Nick";
IList<Cart> cart = cartService.GetPaymentsByUserAndStatus(userName,PaymentStatus.AUTHORIZED); 
for(int i=0; i<cart.Count; i++)
	{
		Console.WriteLine("cartId is :" + cart[i].GetCartId());  
		Console.WriteLine("Transaction Id"+cart[i].GetPayment().GetTransactionId());
		Console.WriteLine("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
		Console.WriteLine("Status"+cart[i].GetPayment().GetStatus());
		Console.WriteLine("Date"+cart[i].GetPayment().GetDate());
	}
String jsonResponse = cart[0].ToString();         
$userName = "Nick";
$cartResponse = $cartService->getPaymentsByUserAndStatus($userName,PaymentStatus::AUTHORIZED); 
foreach ($cartResponse as $cart) 
{
	print_r("cartId is :" . $cart->getCartId());
	print_r("Transaction Id :" . $cart->getPayment()->getTransactionId());
	print_r("Total Amount from payment node :" . $cart->getPayment()->getTotalAmount());
	print_r("Status : " . $cart->getPayment()->getStatus());
	print_r("Date : " . $cart->getPayment()->getDate());
}
$jsonResponse = $cartResponse[0]->toString(); 
Coming Soon
user_id = "user_id";  
p_status = App42::Shopping::Payment_status.new();  
payment_status = p_status.enum("AUTHORIZED");        
cart_list = Array.new();  
cart_list = cart_service.get_payments_by_user_and_status(user_id, payment_status); /* returns the list of Cart object. */  
for cart in cart_list do  
  puts "cartId is #{cart.cart_id}";  
  puts "payment is #{cart.payment}";  
  puts "transactionId is #{cart.transaction_id}";  
  puts "totalAmount is #{cart.total_amount}";  
end  
json_response = cart_list.to_s();
var userName:String = "Nick";  
cartService.getPaymentsByUserAndStatus(userName,PaymentStatus.AUTHORIZED,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		if(response is Array)
		{
			trace("response is Array" + response);
			for(var i:int = 0;i < response.length;i++)
			{
				var cart:Cart = Cart(response[i])
				var payments:Payment  = cart.getPayment();
				trace("CartId is:"+cart.getCartId());
				if(cart.getPayment()!=null)
				{
					trace("Transaction Id"+payments.getTransactionId());
					trace("Total Amount from payment node"+payments.getTotalAmount());
					trace("Status"+payments.getStatus());
					trace("Date"+payments.getDate());
				}
			}
		}
	}
}
Coming Soon

Get Payment By Status

Fetches Payment information based on Status.

Required Parameters

paymentStatus - Status for which type of payment information has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
cartService.getPaymentsByStatus(PaymentStatus.AUTHORIZED,new App42CallBack() {
public void onSuccess(Object response)
{
	ArrayList<Cart> cart = (ArrayList<Cart>)response;
	for(int i=0;i<cart.size();i++)
	{
		System.out.println("cartId is :" + cart.get(i).getCartId());  
		System.out.println("Transaction Id"+cart.get(i).getPayment().getTransactionId());
		System.out.println("Total Amount from payment node"+cart.get(i).getPayment().getTotalAmount());
		System.out.println("Status"+cart.get(i).getPayment().getStatus());
		System.out.println("Date"+cart.get(i).getPayment().getDate());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});   
cartService.GetPaymentsByStatus(PaymentStatus.AUTHORIZED, new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		IList<Cart> cart = (IList<Cart>) response;   
		for(int i=0; i<cart.Count; i++)
		{
			Console.WriteLine("cartId is :" + cart[i].GetCartId());  
			Console.WriteLine("Transaction Id"+cart[i].GetPayment().GetTransactionId());
			Console.WriteLine("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
			Console.WriteLine("Status"+cart[i].GetPayment().GetStatus());
			Console.WriteLine("Date"+cart[i].GetPayment().GetDate());
		}
		String jsonResponse = cart[0].ToString();  
	}  
}  
NSArray *cart = [cartService getPaymentsByStatus:@"AUTHORIZED"]; 
NSLog(@"cartId is %@" , [[cart objectAtIndex:0] cartId]);
NSString *jsonResponse =[[cart objectAtIndex:0] toString]; 
Vector cart = cartService.getPaymentsByStatus(PaymentStatus.AUTHORIZED); 
for(int i=0;i<cart.size();i++)
{
	System.out.println("cartId is :" + ((Cart)cart.elementAt(i)).getCartId());  
	System.out.println("Transaction Id "+((Cart)cart.elementAt(i)).getPayment().getTransactionId());
	System.out.println("Total Amount from payment node "+((Cart)cart.elementAt(i)).getPayment().getTotalAmount());
	System.out.println("Status "+((Cart)cart.elementAt(i)).getPayment().getStatus());
	System.out.println("Date "+((Cart)cart.elementAt(i)).getPayment().getDate());
}
String jsonResponse = ((Cart)cart.elementAt(0)).toString();    
ArrayList<Cart> cart = cartService.getPaymentsByStatus(PaymentStatus.AUTHORIZED); 
for(int i=0;i<cart.size();i++)
{
	System.out.println("cartId is :" + cart.get(i).getCartId());  
	System.out.println("Transaction Id"+cart.get(i).getPayment().getTransactionId());
	System.out.println("Total Amount from payment node"+cart.get(i).getPayment().getTotalAmount());
	System.out.println("Status"+cart.get(i).getPayment().getStatus());
	System.out.println("Date"+cart.get(i).getPayment().getDate());
}
String jsonResponse = cart.get(0).toString();    
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.GetPaymentsByStatus(PaymentStatus.AUTHORIZED, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        IList<Cart> cart =  (IList<Cart>) response;   
       for(int i=0; i<cart.Count; i++)
		{
			App42Log.Console("cartId is :" + cart[i].GetCartId());  
			App42Log.Console("Transaction Id"+cart[i].GetPayment().GetTransactionId());
			App42Log.Console("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
			App42Log.Console("Status"+cart[i].GetPayment().GetStatus());
			App42Log.Console("Date"+cart[i].GetPayment().GetDate());
		}
        App42Log.Console("jsonResponse is :" + cart[0].ToString());
    }

    public void OnException(Exception e)
    {
    	App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
IList<Cart> cart = cartService.GetPaymentsByStatus(PaymentStatus.AUTHORIZED); 
	for(int i=0; i<cart.Count; i++)
	{
		Console.WriteLine("cartId is :" + cart[i].GetCartId());  
		Console.WriteLine("Transaction Id"+cart[i].GetPayment().GetTransactionId());
		Console.WriteLine("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
		Console.WriteLine("Status"+cart[i].GetPayment().GetStatus());
		Console.WriteLine("Date"+cart[i].GetPayment().GetDate());
	}
String jsonResponse = cart[0].ToString();         
$cartResponse = $cartService->getPaymentsByStatus(PaymentStatus::AUTHORIZED); 
foreach ($cartResponse as $cart)
{
	print_r("cartId is :" . $cart->getCartId());
	print_r("Transaction Id :" . $cart->getPayment()->getTransactionId());
	print_r("Total Amount from payment node :" . $cart->getPayment()->getTotalAmount());
	print_r("Status : " . $cart->getPayment()->getStatus());
	print_r("Date : " . $cart->getPayment()->getDate());
}
$jsonResponse = $cartResponse[0]->toString(); 
Coming Soon
p_status = App42::Shopping::Payment_status.new();  
Payment_status = p_status.enum("AUTHORIZED");                        
cart_list = Array.new();  
cart_list = cart_list = cart_service.get_payments_by_status(Payment_status); /* returns the list of Cart object. */  
for cart in cart_list do  
  puts "cartId is #{cart.cart_id}";  
  puts "payment is #{cart.payment}";  
  puts "transactionId is #{cart.transaction_id}";  
  puts "totalAmount is #{cart.total_amount}";  
end  
json_response = cart_list.to_s();
cartService.getPaymentsByStatus(PaymentStatus.AUTHORIZED,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		if(response is Array)
		{
			trace("response is Array" + response);
			for(var i:int = 0;i < response.length;i++)
			{
				var cart:Cart = Cart(response[i])
				var payments:Payment  = cart.getPayment();
				trace("CartId is:"+cart.getCartId());
				if(cart.getPayment()!=null)
				{
					trace("Transaction Id"+payments.getTransactionId());
					trace("Total Amount from payment node"+payments.getTotalAmount());
					trace("Status"+payments.getStatus());
					trace("Date"+payments.getDate());
				}				
			}		
		}
	}
} 
Coming Soon

Get Payment History By User

History of Carts and Payments for a User. It gives all the carts which are in AUTHORIZED, DECLINED, PENDING state.

Required Parameters

userName - Name of the user for whom payment history has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
cartService.getPaymentHistoryByUser(userName,new App42CallBack() {
public void onSuccess(Object response) 
{
	ArrayList<Cart> cart = (ArrayList<Cart>)response;
	for(int i=0;i<cart.size();i++)
	{
		System.out.println("cartId is :" + cart.get(i).getCartId()); 
		System.out.println("userName is :" + cart.get(i).getUserName());  
		System.out.println("cartId is :" + cart.get(i).getCartId());  
		System.out.println("State is :"+cart.get(i).getState());
		System.out.println("CreationTime is :"+cart.get(i).getCreationTime());
		System.out.println("Transaction Id"+cart.get(i).getPayment().getTransactionId());
		System.out.println("Total Amount from payment node"+cart.get(i).getPayment().getTotalAmount());
		System.out.println("Status"+cart.get(i).getPayment().getStatus());
		System.out.println("Date"+cart.get(i).getPayment().getDate());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});    
String userName = "Nick";   
cartService.GetPaymentHistoryByUser(userName, new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		IList<Cart> cart = (IList<Cart>) response;   
		for(int i=0; i<cart.Count; i++)
		{
			Console.WriteLine("cartId is :" + cart[i].GetCartId());  
			Console.WriteLine("Transaction Id"+cart[i].GetPayment().GetTransactionId());
			Console.WriteLine("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
			Console.WriteLine("Status"+cart[i].GetPayment().GetStatus());
			Console.WriteLine("Date"+cart[i].GetPayment().GetDate());
		}
		String jsonResponse = cart[0].ToString();  
	}  
}  
NSString *userName = @"Nick";
NSArray *cart = [cartService getPaymentHistoryByUser:userName]; 
NSLog(@"cartId is %@" , [[cart objectAtIndex:0] cartId]);
NSString *jsonResponse =[[cart objectAtIndex:0] toString]; 
String userName = "Nick";
Vector cart = cartService.getPaymentHistoryByUser(userName); 
for(int i=0;i<cart.size();i++)
{
	System.out.println("cartId is :" + ((Cart)cart.elementAt(i)).getCartId());  
	System.out.println("Transaction Id "+((Cart)cart.elementAt(i)).getPayment().getTransactionId());
	System.out.println("Total Amount from payment node "+((Cart)cart.elementAt(i)).getPayment().getTotalAmount());
	System.out.println("Status "+((Cart)cart.elementAt(i)).getPayment().getStatus());
	System.out.println("Date "+((Cart)cart.elementAt(i)).getPayment().getDate());
}
String jsonResponse = ((Cart)cart.elementAt(0)).toString();    
String userName = "Nick";
ArrayList<Cart> cart = cartService.getPaymentHistoryByUser(userName); 
for(int i=0;i<cart.size();i++)
{
	System.out.println("cartId is :" + cart.get(i).getCartId()); 
	System.out.println("userName is :" + cart.get(i).getUserName());  
	System.out.println("cartId is :" + cart.get(i).getCartId());  
	System.out.println("State is :"+cart.get(i).getState());
	System.out.println("CreationTime is :"+cart.get(i).getCreationTime());
	System.out.println("Transaction Id"+cart.get(i).getPayment().getTransactionId());
	System.out.println("Total Amount from payment node"+cart.get(i).getPayment().getTotalAmount());
	System.out.println("Status"+cart.get(i).getPayment().getStatus());
	System.out.println("Date"+cart.get(i).getPayment().getDate());
}
String jsonResponse = cart.get(0).toString();    
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.GetPaymentHistoryByUser(userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        IList<Cart> cart =  (IList<Cart>) response;   
        for(int i=0; i<cart.Count; i++)
		{
			App42Log.Console("cartId is :" + cart[i].GetCartId());  
			App42Log.Console("Transaction Id"+cart[i].GetPayment().GetTransactionId());
			App42Log.Console("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
			App42Log.Console("Status"+cart[i].GetPayment().GetStatus());
			App42Log.Console("Date"+cart[i].GetPayment().GetDate());
		}
        App42Log.Console("jsonResponse is :" + cart[0].ToString());
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
	}
}
Not Available
Coming Soon
Coming Soon
String userName = "Nick";
IList<Cart> cart = cartService.GetPaymentHistoryByUser(userName); 
	for(int i=0; i<cart.Count; i++)
	{
		Console.WriteLine("cartId is :" + cart[i].GetCartId());  
		Console.WriteLine("Transaction Id"+cart[i].GetPayment().GetTransactionId());
		Console.WriteLine("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
		Console.WriteLine("Status"+cart[i].GetPayment().GetStatus());
		Console.WriteLine("Date"+cart[i].GetPayment().GetDate());
	}
String jsonResponse = cart[0].ToString();         
$userName = "Nick";
$cartResponse = $cartService->getPaymentHistoryByUser($userName); 
foreach ($cartResponse as $cart)
{
	print_r("cartId is :" . $cart->getCartId());
	print_r("Transaction Id :" . $cart->getPayment()->getTransactionId());
	print_r("Total Amount from payment node :" . $cart->getPayment()->getTotalAmount());
	print_r("Status : " . $cart->getPayment()->getStatus());
	print_r("Date : " . $cart->getPayment()->getDate());
}
$jsonResponse = $cartResponse[0]->toString(); 
Coming Soon
user_id = "user_id";                       
cart_list = Array.new();  
cart_list = cart_service.get_payment_history_by_user(user_id);  /* returns the list of Cart object. */  
for cart in cart_list do  
  puts "userName is #{cart.user_name}";  
  puts "cartId is #{cart.cart_id}";  
  puts "state is #{cart.state}";  
  item_list =Array.new();  
  item_list = cart.get_item_list();  
  for item in item_list do  
    puts "itemid is #{item.item_id}";  
    puts "quantity is #{item.quantity}";  
    puts "price is #{item.price}";  
    puts "totalAmount is #{item.total_amount}";  
  end  
  puts "payment is #{cart.payment}";  
  puts "transactionId is #{cart.transaction_id}";  
  puts "totalAmount is #{cart.total_amount}";  
end  
json_response = cart_list.to_s();
var userName:String = "Nick";
cartService.getPaymentHistoryByUser(userName,new payment());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		if(response is Array)
		{
			trace("response is Array" + response);
			for(var i:int = 0;i < response.length;i++)
			{
				var cart:Cart = Cart(response[i])
				var payments:Payment  = cart.getPayment();
				var itemList1:Array = cart.getItemList();
				trace("CartId is:"+cart.getCartId());
				trace("Cart Session is"+cart.getCartSession());				
				trace("CheckOut Time : "+cart.getCheckOutTime());				
				trace("CreationTime is"+cart.getCreationTime());				
				trace("State is:"+cart.getState());
				trace("UserName is:"+cart.getUserName());
				if(itemList1!= null)
				{
					for(var t:int=0;t<itemList1.length;t++)
					{
						var item1:Item = Item(itemList1[t]);
						trace("ItemId is"+item1.getItemId());
						trace("Quantity"+item1.getQuantity());
						trace("Total Amount"+item1.getTotalAmount());
					}
				}
				if(cart.getPayment()!=null)
				{
					trace("Transaction Id"+payments.getTransactionId());
					trace("Total AMount from payment node"+payments.getTotalAmount());
					trace("Status"+payments.getStatus());
					trace("Date"+payments.getDate());
				}
			}			
		}
	}
}
Coming Soon

Get Payment History All

History of all carts. It gives all the carts which are in AUTHORIZED, DECLINED, PENDING state.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
cartService.getPaymentHistoryAll(new App42CallBack() {
public void onSuccess(Object response) 
{
	ArrayList<Cart> cart = (ArrayList<Cart>)response;
	for(int i=0;i<cart.size();i++)
	{
		System.out.println("cartId is :" + cart.get(i).getCartId()); 
		System.out.println("userName is :" + cart.get(i).getUserName());  
		System.out.println("cartId is :" + cart.get(i).getCartId());  
		System.out.println("State is :"+cart.get(i).getState());
		System.out.println("CreationTime is :"+cart.get(i).getCreationTime());
		System.out.println("Transaction Id"+cart.get(i).getPayment().getTransactionId());
		System.out.println("Total Amount from payment node"+cart.get(i).getPayment().getTotalAmount());
		System.out.println("Status"+cart.get(i).getPayment().getStatus());
		System.out.println("Date"+cart.get(i).getPayment().getDate());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
});   
cartService.GetPaymentHistoryAll(new Callback());  
public class Callback : App42Callback  
{    
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		IList<Cart> cart = (IList<Cart>) response;   
		for(int i=0; i<cart.Count; i++)
		{
			Console.WriteLine("cartId is :" + cart[i].GetCartId());  
			Console.WriteLine("Transaction Id"+cart[i].GetPayment().GetTransactionId());
			Console.WriteLine("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
			Console.WriteLine("Status"+cart[i].GetPayment().GetStatus());
			Console.WriteLine("Date"+cart[i].GetPayment().GetDate());
		}
		String jsonResponse = cart[0].ToString();  
	}  
}  
NSArray *cart = [cartService getPaymentHistoryAll]; 
NSLog(@"cartId is %@" , [[cart objectAtIndex:0] cartId]);
NSString *jsonResponse =[[cart objectAtIndex:0] toString]; 
Vector cart = cartService.getPaymentHistoryAll(); 
for(int i=0;i<cart.size();i++)
{
	System.out.println("cartId is :" + ((Cart)cart.elementAt(i)).getCartId());  
	System.out.println("userName is :" + ((Cart)cart.elementAt(i)).getUserName());  
	System.out.println("State is :"+((Cart)cart.elementAt(i)).getState());
	System.out.println("CreationTime is :"+((Cart)cart.elementAt(i)).getCreationTime());
	System.out.println("Transaction Id "+((Cart)cart.elementAt(i)).getPayment().getTransactionId());
	System.out.println("Total Amount from payment node "+((Cart)cart.elementAt(i)).getPayment().getTotalAmount());
	System.out.println("Status "+((Cart)cart.elementAt(i)).getPayment().getStatus());
	System.out.println("Date "+((Cart)cart.elementAt(i)).getPayment().getDate());
}
String jsonResponse = ((Cart)cart.elementAt(0)).toString();    
ArrayList<Cart> cart = cartService.getPaymentHistoryAll(); 
for(int i=0;i<cart.size();i++)
{
	System.out.println("cartId is :" + cart.get(i).getCartId()); 
	System.out.println("userName is :" + cart.get(i).getUserName());  
	System.out.println("State is :"+cart.get(i).getState());
	System.out.println("CreationTime is :"+cart.get(i).getCreationTime());
	System.out.println("Transaction Id"+cart.get(i).getPayment().getTransactionId());
	System.out.println("Total Amount from payment node"+cart.get(i).getPayment().getTotalAmount());
	System.out.println("Status"+cart.get(i).getPayment().getStatus());
	System.out.println("Date"+cart.get(i).getPayment().getDate());
}
String jsonResponse = cart.get(0).toString();    
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.GetPaymentHistoryAll(new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        IList<Cart> cart =  (IList<Cart>) response;   
        for(int i=0; i<cart.Count; i++)
		{
			App42Log.Console("cartId is :" + cart[i].GetCartId());  
			App42Log.Console("Transaction Id"+cart[i].GetPayment().GetTransactionId());
			App42Log.Console("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
			App42Log.Console("Status"+cart[i].GetPayment().GetStatus());
			App42Log.Console("Date"+cart[i].GetPayment().GetDate());
		}
        App42Log.Console("jsonResponse is :" + cart[0].ToString());
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
Not Available
Coming Soon
Coming Soon
IList<Cart> cart = cartService.GetPaymentHistoryAll(); 
	for(int i=0; i<cart.Count; i++)
	{
		Console.WriteLine("cartId is :" + cart[i].GetCartId());  
		Console.WriteLine("Transaction Id"+cart[i].GetPayment().GetTransactionId());
		Console.WriteLine("Total Amount from payment node"+cart[i].GetPayment().GetTotalAmount());
		Console.WriteLine("Status"+cart[i].GetPayment().GetStatus());
		Console.WriteLine("Date"+cart[i].GetPayment().GetDate());
	}
String jsonResponse = cart[0].ToString();         
$cartResponse = $cartService->getPaymentHistoryAll(); 
foreach ($cartResponse as $cart)
{
	print_r("cartId is :" . $cart->getCartId());
	print_r("Transaction Id :" . $cart->getPayment()->getTransactionId());
	print_r("Total Amount from payment node :" . $cart->getPayment()->getTotalAmount());
	print_r("Status : " . $cart->getPayment()->getStatus());
	print_r("Date : " . $cart->getPayment()->getDate());
}
$jsonResponse = $cartResponse[0]->toString(); 
Coming Soon
cart_list = Array.new();  
cart_list = cart_service.get_payment_history_all(); /* returns the list of Cart object. */  
for cart in cart_list do  
  puts "userName is #{cart.user_name}";  
  puts "cartId is #{cart.cart_id}";  
  puts "state is #{cart.state}";  
  item_list =Array.new();  
  item_list = cart.get_item_list();  
  for item in item_list do  
    puts "itemid is #{item.item_id}";  
    puts "quantity is #{item.quantity}";  
    puts "price is #{item.price}";  
    puts "totalAmount is #{item.total_amount}";  
  end  
  puts "cartId is #{cart.cart_id}";  
  puts "payment is #{cart.payment}";  
  puts "transactionId is #{cart.transaction_id}";  
  puts "totalAmount is #{cart.total_amount}";  
end  
json_response = cart_list.to_s();
cartService.getPaymentHistoryAll(new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		if(response is Array)
		{
			trace("response is Array" + response);
			for(var i:int = 0;i < response.length;i++)
			{
				var cart:Cart = Cart(response[i])
				var payments:Payment  = cart.getPayment();
				var itemList1:Array = cart.getItemList();
				trace("CartId is:"+cart.getCartId());			
				trace("CheckOut Time : "+cart.getCheckOutTime());				
				trace("CreationTime is"+cart.getCreationTime());				
				trace("State is:"+cart.getState());
				trace("UserName is:"+cart.getUserName());
				if(itemList1!= null)
				{
					for(var t:int=0;t<itemList1.length;t++)
					{
						var item1:Item = Item(itemList1[t]);
						trace("ItemId is"+item1.getItemId());
						trace("Quantity"+item1.getQuantity());
						trace("Total Amount"+item1.getTotalAmount());
					}
				}
				if(cart.getPayment()!=null)
				{
					trace("Transaction Id"+payments.getTransactionId());
					trace("Total Amount from payment node"+payments.getTotalAmount());
					trace("Status"+payments.getStatus());
					trace("Date"+payments.getDate());
				}
			}			
		}
	}
}
Coming Soon

Increase Quantity

To increase the quantity of existing item in the cart.

Required Parameters

cartID - The cart id for which quantity of item has to be increased. itemID - The item id that has to be increased. itemQuantity - The quantity of the item that has to be increased.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";
String itemID = "itemID";
int itemQuantity = 12;
cartService.increaseQuantity(cartId , itemID, itemQuantity,new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println("cartId is :" + cart.getCartId());  
	ArrayList<Cart.Item> itemList =  cart.getItemList(); 
	for(int i=0;i<itemList.size();i++)
	{
		System.out.println("ItemId is"+itemList.get(i).getItemId());
		System.out.println("Price "+itemList.get(i).getPrice());
		System.out.println("Quantity"+itemList.get(i).getQuantity());
		System.out.println("Total Amount"+itemList.get(i).getTotalAmount());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String cartId = "cartId";
String itemID = "itemID";
int itemQuantity = 12;
cartService.IncreaseQuantity(cartId,itemID,itemQuantity,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;     
		IList<Cart.Item> itemList =  cart.GetItemList(); 
		for(int i=0;i < itemList.Count; i++)
		{
			Console.WriteLine("ItemId is " + itemList[i].GetItemId());
			Console.WriteLine("Price " + itemList[i].GetPrice());
			Console.WriteLine("Quantity " + itemList[i].GetQuantity());
			Console.WriteLine("Total Amount " + itemList[i].GetTotalAmount());
		}
		String jsonResponse = cart.ToString();
	}  
}
NSString *cartId = @"cartId";	
NSString *itemID = @"itemID";
int itemQuantity = 12;
Cart *cart = [cartService increaseQuantity:cartId itemID:itemID itemQuantity:itemQuantity]; 
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String cartId = "cartId";	
String itemID = "itemID";
int itemQuantity = 12;
Cart cart = cartService.increaseQuantity(cartId,itemID,itemQuantity);
Vector itemList =  cart.getItemList(); 
for(int i=0;i<itemList.size();i++)
{
	System.out.println("ItemId is " + ((Cart.Item)itemList.elementAt(i)).getItemId());
	System.out.println("Price " + ((Cart.Item)itemList.elementAt(i)).getPrice());
	System.out.println("Quantity " + ((Cart.Item)itemList.elementAt(i)).getQuantity());
	System.out.println("Total Amount " + ((Cart.Item)itemList.elementAt(i)).getTotalAmount());
}
String jsonResponse = cart.toString(); 
String cartId = "cartId";	
String itemID = "itemID";
int itemQuantity = 12;
Cart cart = cartService.increaseQuantity(cartId,itemID,itemQuantity); 
System.out.println("cartId is :" + cart.getCartId());  
ArrayList<Cart.Item> itemList =  cart.getItemList(); 
for(int i=0;i<itemList.size();i++)
{
	System.out.println("ItemId is"+itemList.get(i).getItemId());
	System.out.println("Price "+itemList.get(i).getPrice());
	System.out.println("Quantity"+itemList.get(i).getQuantity());
	System.out.println("Total Amount"+itemList.get(i).getTotalAmount());
}
String jsonResponse = cart.toString(); 
String cartId = "cartId";    
String itemID = "itemID";
int itemQuantity = 12;
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.IncreaseQuantity(cartId,itemID,itemQuantity, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Cart cart =  (Cart) response;   
        IList<Cart.Item> itemList =  cart.GetItemList(); 
		for(int i=0;i < itemList.Count; i++)
		{
			App42Log.Console("ItemId is " + itemList[i].GetItemId());
			App42Log.Console("Price " + itemList[i].GetPrice());
			App42Log.Console("Quantity " + itemList[i].GetQuantity());
			App42Log.Console("Total Amount " + itemList[i].GetTotalAmount());
		}
        App42Log.Console("jsonResponse is :" + cart.ToString());
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";	
String itemID = "itemID";
int itemQuantity = 12;
Cart cart = cartService.IncreaseQuantity(cartId,itemID,itemQuantity);  
IList<Cart.Item> itemList =  cart.GetItemList(); 
	for(int i=0;i < itemList.Count; i++)
	{
		Console.WriteLine("ItemId is " + itemList[i].GetItemId());
		Console.WriteLine("Price " + itemList[i].GetPrice());
		Console.WriteLine("Quantity " + itemList[i].GetQuantity());
		Console.WriteLine("Total Amount " + itemList[i].GetTotalAmount());
	}
String jsonResponse = cart.ToString();
$cartId = "cartId";	
$itemID = "itemID";
$itemQuantity = 12;		
$cart = $cartService->increaseQuantity($cartId,$itemID,$itemQuantity);
print_r("cartId is " . $cart->getCartId());
$item =  $cart->GetItemList();
foreach($item as $itemList )
{
	print_r("ItemId is".$itemList->getItemId());
	print_r("Price ".$itemList->getPrice());
	print_r("Quantity".$itemList->getQuantity());
	print_r("Total Amount".$itemList->getTotalAmount());
}
$jsonResponse = $cart->toString(); 
Coming Soon
cart_id = "cart_iD";  
item_id = "item_id";  
item_quantity = 5;                  
cart = cart_service.increase_quantity(cart_id, item_id, item_quantity); /* returns the Cart object. */  
puts "cartId is #{cart.cart_id}";  
item_list = Array.new();  
item_list = cart.getItemList();  
for item in item_list do  
  puts "itemid is #{item.item_id}";  
  puts "quantity is #{item.quantity}";  
  puts "price is #{item.price}";  
  puts "totalAmount is #{item.total_amount}";  
end  
json_response = cart.to_s();
var cartId:String = "cartId";
var itemId:String = "itemId";   
var itemQuantity:int = 12;  
cartService.increaseQuantity(cartId,itemId, itemQuantity,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());
		var itemList:Array = cart1.getItemList();
		if(itemList != null)
		{
			for(var p:int=0;p<itemList.length;p++)
			{
				var item:Item = Item(itemList[p]);
				trace("ItemId is"+item.getItemId());
				trace("Price "+item.getPrice());
				trace("Quantity"+item.getQuantity());
				trace("Total Amount"+item.getTotalAmount());
			}	
		}
	}
} 
Coming Soon 

Decrease Quantity

To decrease the quantity of existing item in the cart.

Required Parameters

cartID - The cart id for which item has to be decreased. itemID - The item id that has to be decreased. itemQuantity - The quantity of the item that has to be decreased.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";
String itemID = "itemID";
int itemQuantity = 12;
cartService.decreaseQuantity(cartId, itemID, itemQuantity,new App42CallBack() {
public void onSuccess(Object response)
{
	Cart  cart  = (Cart)response;
	System.out.println("cartId is :" + cart.getCartId());  
	ArrayList<Cart.Item> itemList =  cart.getItemList(); 
	for(int i=0;i<itemList.size();i++)
	{
		System.out.println("ItemId is"+itemList.get(i).getItemId());
		System.out.println("Price "+itemList.get(i).getPrice());
		System.out.println("Quantity"+itemList.get(i).getQuantity());
		System.out.println("Total Amount"+itemList.get(i).getTotalAmount());
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
}); 
String cartId = "cartId";
String itemID = "itemID";
int itemQuantity = 12;
cartService.DecreaseQuantity(cartId,itemID,itemQuantity,new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		Cart cart = (Cart) response;     
		IList<Cart.Item> itemList =  cart.GetItemList(); 
		for(int i=0;i < itemList.Count; i++)
		{
			Console.WriteLine("ItemId is " + itemList[i].GetItemId());
			Console.WriteLine("Price " + itemList[i].GetPrice());
			Console.WriteLine("Quantity " + itemList[i].GetQuantity());
			Console.WriteLine("Total Amount " + itemList[i].GetTotalAmount());
		}
		String jsonResponse = cart.ToString();
	}  
}
NSString *cartId = @"cartId";	
NSString *itemID = @"itemID";
int itemQuantity = 12;
Cart *cart = [cartService decreaseQuantity:cartId itemID:itemID itemQuantity:itemQuantity]; 
NSLog(@"cartId is = %@",cart.cartId);
NSString *jsonResponse = [cart toString]; 
String cartId = "cartId";	
String itemID = "itemID";
int itemQuantity = 12;
Cart cart = cartService.decreaseQuantity(cartId,itemID,itemQuantity);
Vector itemList =  cart.getItemList(); 
for(int i=0;i<itemList.size();i++)
{
	System.out.println("ItemId is " + ((Cart.Item)itemList.elementAt(i)).getItemId());
	System.out.println("Price " + ((Cart.Item)itemList.elementAt(i)).getPrice());
	System.out.println("Quantity " + ((Cart.Item)itemList.elementAt(i)).getQuantity());
	System.out.println("Total Amount " + ((Cart.Item)itemList.elementAt(i)).getTotalAmount());
}
String jsonResponse = cart.toString(); 
String cartId = "cartId";	
String itemID = "itemID";
int itemQuantity = 12;
Cart cart = cartService.decreaseQuantity(cartId,itemID,itemQuantity); 
System.out.println("cartId is :" + cart.getCartId());  
ArrayList<Cart.Item> itemList =  cart.getItemList(); 
for(int i=0;i<itemList.size();i++)
{
	System.out.println("ItemId is"+itemList.get(i).getItemId());
	System.out.println("Price "+itemList.get(i).getPrice());
	System.out.println("Quantity"+itemList.get(i).getQuantity());
	System.out.println("Total Amount"+itemList.get(i).getTotalAmount());
}
String jsonResponse = cart.toString(); 
String cartId = "cartId";    
String itemID = "itemID";
int itemQuantity = 8;
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.DecreaseQuantity(cartId,itemID,itemQuantity, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Cart cart =  (Cart) response;   
        IList<Cart.Item> itemList =  cart.GetItemList(); 
		for(int i=0;i < itemList.Count; i++)
		{
			App42Log.Console("ItemId is " + itemList[i].GetItemId());
			App42Log.Console("Price " + itemList[i].GetPrice());
			App42Log.Console("Quantity " + itemList[i].GetQuantity());
			App42Log.Console("Total Amount " + itemList[i].GetTotalAmount());
		}
        App42Log.Console("jsonResponse is :" + cart.ToString());
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";	
String itemID = "itemID";
int itemQuantity = 12;
Cart cart = cartService.DecreaseQuantity(cartId,itemID,itemQuantity);  
Console.WriteLine("cartId is " + cart.GetCartId()); 
IList<Cart.Item> itemList =  cart.GetItemList(); 
	for(int i=0;i < itemList.Count; i++)
	{
		Console.WriteLine("ItemId is " + itemList[i].GetItemId());
		Console.WriteLine("Price " + itemList[i].GetPrice());
		Console.WriteLine("Quantity " + itemList[i].GetQuantity());
		Console.WriteLine("Total Amount " + itemList[i].GetTotalAmount());
	}
String jsonResponse = cart.ToString();
$cartId = "cartId";	
$itemID = "itemID";
$itemQuantity = 12;		
$cart = $cartService->decreaseQuantity($cartId,$itemID,$itemQuantity);
print_r("cartId is " . $cart->getCartId());
$item =  $cart->GetItemList();
foreach($item as $itemList )
{
	print_r("ItemId is".$itemList->getItemId());
	print_r("Price ".$itemList->getPrice());
	print_r("Quantity".$itemList->getQuantity());
	print_r("Total Amount".$itemList->getTotalAmount());
}
$jsonResponse = $cart->toString(); 
Coming Soon
cart_id = "cart_id";  
item_id = "item_id";  
item_quantity = 3;                      
cart = cart_service.decrease_quantity(cart_id, item_id, item_quantity); /* returns the Cart object. */  
puts "cartId is #{cart.cart_id}";  
item_list = Array.new();  
item_list = cart.get_item_list();  
for item in item_list do  
  puts "itemid is #{item.item_id}";  
  puts "quantity is #{item.quantity}";  
  puts "price is #{item.price}";  
  puts "totalAmount is #{item.total_amount}";  
end  
json_response = cart.to_s();
var cartId:String = "cartId";
var itemId:String = "itemId";   
var itemQuantity:int = 12;  
cartService.decreaseQuantity(cartId,itemId, itemQuantity,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
		var cart1:Cart = Cart(response);
		trace("CartId is:"+cart1.getCartId());
		var itemList:Array = cart1.getItemList();
		if(itemList != null)
		{
			for(var p:int=0;p<itemList.length;p++)
			{
				var item:Item = Item(itemList[p]);
				trace("ItemId is"+item.getItemId());
				trace("Price "+item.getPrice());
				trace("Quantity"+item.getQuantity());
				trace("Total Amount"+item.getTotalAmount());
			}	
		}
	}
}
Coming Soon 

Remove Item

Removes the specified item from the specified Cart.

Required Parameters

cartId - The cart id from which the item has to be removed. itemId - Id of the Item which has to be removed.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";
String itemId = "itemId";
cartService.removeItem(cartId, itemId,new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("response is " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
}); 
String cartId = "cartId";
String itemId = "itemId";
cartService.RemoveItem(cartId,itemId, new Callback());  
public class Callback : App42Callback  
{  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		App42Response app42Response = (App42Response) response;  
		Console.WriteLine("App42Response Is : " + app42Response);  		
		String jsonResponse = app42Response.ToString();  
	}  
}  
NSString *cartId = @"cartId";
NSString *itemID = @"itemID";
App42Response *response = [cartService removeItem:cartId itemId:itemId]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String cartId = "cartId";
String itemId = "itemId";
App42Response response = cartService.removeItem(cartId, itemId); 
System.out.println("response is " + response) ;  
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String cartId = "cartId";
String itemId = "itemId";
App42Response app42response = cartService.removeItem(cartId, itemId); 
System.out.println("response is " + app42response) ;  
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String cartId = "cartId";    
String itemID = "itemID";
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.RemoveItem(cartId,itemID, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response =  (App42Response) response;   
        App42Log.Console("app42Response is :" + app42Response.ToString());
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
Not Available 
Coming Soon
Coming Soon
String cartId = "cartId";
String itemId = "itemId";
App42Response app42Response = cartService.RemoveItem(cartId, itemId); 
Boolean  success = app42Response.IsResponseSuccess();
Console.WriteLine("App42Response Is : " + app42Response);  		
String jsonResponse = app42Response.ToString(); 
$cartId = "cartId";
$itemId = "itemId";
$response = $cartService->removeItem($cartId, $itemId); 
print_r("Response is : ".$response->toString());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
Coming Soon
var cartId:String = "cartId";  
var itemID:String = "itemID"; 
cartService.removeItem(cartId,itemID,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)   	
	}
} 
Coming Soon 

Remove All Items

Removes all Items from the specified Cart.

Required Parameters

cartId - The cart id from which the item has to be removed.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String cartId = "cartId";
cartService.removeAllItems(cartId,new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("response is " + app42response) ;  
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());	
}
}); 
String cartId = "cartId";
cartService.RemoveAllItems(cartId, new Callback()); 
public class Callback : App42Callback  
{   
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
	public void OnSuccess(Object response)  
	{  
		App42Response app42Response = (App42Response) response;     
		Console.WriteLine("App42Response Is : " + app42Response);  		
		String jsonResponse = app42Response.ToString();  
	}  
}  
NSString *cartId = @"cartId";
App42Response *response = [cartService removeAllItems:cartId]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String cartId = "cartId";
App42Response response = cartService.removeAllItems(cartId); 
System.out.println("response is " + response) ;   
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String cartId = "cartId";
App42Response app42response = cartService.removeAllItems(cartId); 
System.out.println("response is " + app42response) ; 
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String cartId = "cartId";
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.RemoveAllItems(cartId, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response =  (App42Response) response;   
        App42Log.Console("app42Response is :" + app42Response.ToString());
    }

    public void OnException(Exception e)
    {
        App42Log.Console("Exception : " + e);
    }
}
Not Available 
Coming Soon
Coming Soon
String cartId = "cartId";
App42Response app42Response = cartService.RemoveAllItems(cartId); 
Boolean  success = app42Response.IsResponseSuccess();
Console.WriteLine("App42Response Is : " + app42Response);  		
String jsonResponse = app42Response.ToString(); 
$cartId = "cartId";
$response = $cartService->removeAllItems($cartId); 
print_r("Response is : ".$response->toString());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
Coming Soon
var cartId:String = "cartId"; 
cartService.removeAllItems(cartId,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)   	
	}
}
Coming Soon 

Exception Handling

The functions available under Shopping Cart API can throw some exceptions in abnormal conditions. Example of the same has been given below. E.g. If an App developer is requesting a cart with id which is not in database, the function will throw the App42Exception (as shown below) with message as “Not Found” and the appErrorCode as “3301” and the details as “Cart with the id ‘@cartId’ does not exist”.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for Corona
  • create User Api for Cocos2DX
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
 
String cartId = "cartId";
cart.getCartDetails(cartId, new App42CallBack() {
public void onSuccess(Object response) 
{
	Cart  cart  = (Cart )response;
	System.out.println("userName is :" + cart.getUserName());  
	System.out.println("cartId is :" + cart.getCartId());  
	System.out.println("State is :"+cart.getState());
	System.out.println("CreationTime is :"+cart.getCreationTime());
}
public void onException(Exception ex) 
{
	App42Exception exception = (App42Exception)ex;
	int appErrorCode = exception.getAppErrorCode();
	int httpErrorCode = exception.getHttpErrorCode();
	if(appErrorCode == 3301)
	{
	// Handle here for Not Found (Cart with the id '@cartId' does not exist.)
	}
	else if(appErrorCode  == 3302)
	{
	// Handle here for Bad Request (The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartRow.state' state. Please use the paymentHistoryXXX methods.)
	}
	else if(appErrorCode == 1401)
	{
	// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500)
	{
	// handle here for Internal Server Error
	}	
	String jsonText = exception.getMessage(); 
	}    
});	          
String cartId = "cartId";
cartService.GetCartDetails(cartId, new Callback());  
public class Callback : App42Callback  
{ 
	public void OnException(App42Exception exception)  
	{  
		int appErrorCode = exception.GetAppErrorCode();
		int httpErrorCode = exception.GetHttpErrorCode();
		if(appErrorCode == 3301)
		{
			// Handle here for Not Found (Cart with the id '@cartId' does not exist.)
		}
		else if(appErrorCode  == 3302)
		{
			// Handle here for Bad Request (The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartRow.state' state. Please use the paymentHistoryXXX methods.)
		}
		else if(appErrorCode == 1401)
		{
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500)
		{
			// handle here for Internal Server Error
		}	
		String jsonText = exception.GetMessage(); 
	}  
	public void OnSuccess(Object object)  
	{  
		Cart cart = (Cart) object;
		String jsonResponse = cart.ToString();  
	}  
}  
					
String cartId = "cartId";
@try
{
	Cart *cart= [cartService getCartDetails:cartId];
} @catch(App42Exception *ex) {
	int appErrorCode = ex.appErrorCode;
	int httpErrorCode = ex.httpErrorCode;
	if(appErrorCode == 3301)
	{
		// Handle here for Not Found (Cart with the id '@cartId' does not exist.)
	}
	else if(appErrorCode  == 3302)
	{
		// Handle here for Bad Request (The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartRow.state' state. Please use the paymentHistoryXXX methods.)
	}
	else if(appErrorCode == 1401)
	{
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500)
	{
		// handle here for Internal Server Error
	}
	NSString *jsonText = ex.reason; 
} 
String cartId = "cartId";
try
{
	Cart cart = cartService.getCartDetails(cartId);
}
catch(App42Exception ex)
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 3301)
	{
		// Handle here for Not Found (Cart with the id '@cartId' does not exist.)
	}
	else if(appErrorCode  == 3302)
	{
		// Handle here for Bad Request (The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartRow.state' state. Please use the paymentHistoryXXX methods.)
	}
	else if(appErrorCode == 1401)
	{
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500)
	{
		// handle here for Internal Server Error
	}	
	String jsonText = ex.getMessage(); 
}    
String cartId = "cartId";
try
{
	Cart cart = cartService.getCartDetails(cartId);
}
catch(App42Exception ex)
{
	int appErrorCode = ex.getAppErrorCode();
	int httpErrorCode = ex.getHttpErrorCode();
	if(appErrorCode == 3301)
	{
		// Handle here for Not Found (Cart with the id '@cartId' does not exist.)
	}
	else if(appErrorCode  == 3302)
	{
		// Handle here for Bad Request (The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartRow.state' state. Please use the paymentHistoryXXX methods.)
	}
	else if(appErrorCode == 1401)
	{
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500)
	{
		// handle here for Internal Server Error
	}	

	String jsonText = ex.getMessage(); 
}    
String cartId = "cartId";
App42Log.SetDebug(true);        //Prints output in your editor console
cartService.GetCartDetails(cartId, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnException(Exception e)
    {
	    App42Exception ex = (App42Exception)e; 
        int appErrorCode = ex.GetAppErrorCode();
        int httpErrorCode = ex.GetHttpErrorCode();
    	if(appErrorCode == 3301)
    	{
    		// Handle here for Not Found (Cart with the id '@cartId' does not exist.)
    	}
    	else if(appErrorCode  == 3302)
    	{
    		// Handle here for Bad Request (The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartRow.state' state. Please use the paymentHistoryXXX methods.)
    	}
    	else if(appErrorCode == 1401)
    	{
    		// handle here for Client is not authorized
    	}
    	else if(appErrorCode == 1500)
    	{
    		// handle here for Internal Server Error
    	}	
    	String jsonText = ex.GetMessage(); 
    }
    
    public void OnSuccess(object response)
    {
        App42Log.Console("response is :" + response.ToString());
    }

}
Not Available
Coming Soon
Coming Soon
String cartId = "cartId";
try
{
	Cart cart = cartService.GetCartDetails(cartId);
}
catch(App42Exception ex)
{
	int appErrorCode = ex.GetAppErrorCode();
	int httpErrorCode = ex.GetHttpErrorCode();
	if(appErrorCode == 3301)
	{
		// Handle here for Not Found (Cart with the id '@cartId' does not exist.)
	}
	else if(appErrorCode  == 3302)
	{
		// Handle here for Bad Request (The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartRow.state' state. Please use the paymentHistoryXXX methods.)
	}
	else if(appErrorCode == 1401)
	{
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500)
	{
		// handle here for Internal Server Error
	}	
	String jsonText = ex.GetMessage(); 
}    
$cartId = "cartId";
try
{
	$cart = $cartService->getCartDetails($cartId);
}
catch(App42Exception $ex )
{
	$appErrorCode = ex->getAppErrorCode();
	$httpErrorCode = ex->getHttpErrorCode();
	if($appErrorCode == 3301)
	{
		// Handle here for Not Found (Cart with the id '@cartId' does not exist.)
	}
	else if($appErrorCode  == 3302)
	{
		// Handle here for Bad Request (The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartRow.state' state. Please use the paymentHistoryXXX methods.)
	}
	else if($appErrorCode == 1401)
	{
		// handle here for Client is not authorized
	}
	else if($appErrorCode == 1500)
	{
		// handle here for Internal Server Error
	}	
	String $jsonText = ex->getMessage(); 
} 
Coming Soon
cart_id = "cartId";                     
begin
	cart = cart_service.get_cart_details(cart_id); /* returns the Cart object. */   
	rescue App42Exception => ex
	appErrorCode = ex.app_error_code;
	httpErrorCode = ex.http_error_code;
	if(appErrorCode == 3301)
		# Handle here for Not Found (Cart with the id '@cartId' does not exist.)
	elsif(appErrorCode == 3302)
		# Handle here for Bad Request (The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartRow.state' state. Please use the paymentHistoryXXX methods.)
	elsif(appErrorCode == 1401)
		# handle here for Client is not authorized.
	else(appErrorCode == 1500)
		# handle here for Internal Server Error
	end
	jsonText = ex.getMessage(); 
end 
var cartId:String = "cartId";  
cartService.getCartDetails(cartId, new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		var appErrorCode:int = exception.getAppErrorCode();  
		var httpErrorCode:int = exception.getHttpErrorCode();  
		if(appErrorCode == 3301)
		{
			// Handle here for Not Found (Cart with the id '@cartId' does not exist.)
		}
		else if(appErrorCode  == 3302)
		{
			// Handle here for Bad Request (The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartRow.state' state. Please use the paymentHistoryXXX methods.)
		}
		else if(appErrorCode == 1401)
		{
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500)
		{
			// handle here for Internal Server Error
		}	
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is" + response);
	}
}  
Coming Soon

Error Codes

Functions in Cart API might throw exceptions with following HTTP and Application Error Codes (along with their descriptions):

1400 - BAD REQUEST - The Request parameters are invalid. 1401 - UNAUTHORIZED - Client is not authorized. 1500 - INTERNAL SERVER ERROR - Internal Server Error. Please try again. 3300 - NOT FOUND - User by the name '@userName' does not exist. 3301 - NOT FOUND - Cart with the id '@cartId' does not exist. 3302 - BAD REQUEST - The request parameters are invalid. The details of the cart with the Id '@cartId' cannot be fetched since it is in '@cartState' state. Please use the paymentHistoryXXX methods. 3303 - BAD REQUEST - The request parameters are invalid. Item to the cart with the Id '@cartId' cannot be added since it is in '@cartState' state. 3304 - NOT FOUND - Cart with the id '@cartId' does not have any items. 3305 - BAD REQUEST - The request parameters are invalid. The cart with the Id '@cartId' cannot be checked out since it is in '@cartState' state. 3306 - NOT FOUND - Cart with the id '@cartId' does not have any items to checkout. 3307 - BAD REQUEST - The request parameters are invalid. Cart with the Id '@cartId' is already in '@cartState' state. 3308 - BAD REQUEST - The request parameters are invalid. Cart with the Id '@cartId' is not in 'CHECKOUT' state. Payment cannot be initiated. 3309 - NOT FOUND - Cart with the id '@cartId' does not have the item with the Id '@itemId'. 3310 - NOT FOUND - Cart for the user with the id '@userId' does not exist. 3311 - NOT FOUND - Payment transactions for the user with the id '@userId' does not exist. 3312 - NOT FOUND - Payment transactions for the Cart with the id '@cartId' does not exist. 3313 - NOT FOUND - Cart for the user with the id '@userId' and status '@status' does not exist. 3314 - NOT FOUND - Payment transactions for the user with the id '@userId' and status '@status' does not exist. 3315 - NOT FOUND - Payment transactions for the status '@status' does not exist. 3316 - NOT FOUND - Cart for the user with the id '@userId' does not exist in payment history. 3317 - NOT FOUND - Carts with status ('DECLINED', 'PENDING', 'AUTHORIZED') does not exist in payment history. 3318 - BAD REQUEST - The request parameters are invalid. Item from the cart with the Id '@cartId' cannot be removed since it is in '@cartState' state. 3319 - BAD REQUEST - The request parameters are invalid. Payment for cart with the Id '@cartId' cannot be initiated since it is already in 'AUTHORIZED' state. 3320 - BAD REQUEST - Item with the Id '@itemId' in the cart with the id '@cartId' already exists. Please use 'increaseQuantity' method to add more quantity. 3321 - BAD REQUEST - The request parameters are invalid. Requested quantity should be less then existing quantity. 3322 - NOT FOUND - Item with the id '@itemId' in the cart with the id '@cartId' does not exist.