Skip to content

CardCashLLC/CardCash_API_SDK_JAVA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CardCash API SDK JAVA

This is currently a simple CardCash API SDK written in JAVA to assist bulk seller partners in communicating with CardCash Client API.

Dependencies

  • JAVA (>= 1.8)
  • com.google.code.gso (>=2.8.6)
  • org.apache.httpcomponents (4.5.10)

maven

<dependency>
    <groupId>com.google.code.gson</groupId>
    <artifactId>gson</artifactId>
    <version>2.8.6</version>
</dependency>
<dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpclient</artifactId>
    <version>4.5.10</version>
</dependency>

gradle

repositories {
    mavenCentral()
}
dependencies {
    compile 'org.apache.httpcomponents:httpclient:4.5.10'
    compile 'com.google.code.gson:gson:2.8.6' 
}

Requirements

  1. CardCash Bulk Seller Agreement
  2. CardCash X-CC-APP-ID
  3. Bulk Seller Customer Account ( Sandbox can be created via this SDK )
  4. Default Bank Account w/ Default Payment Method for Bulk Seller Customer Account

Methods

  • CustomerLogin(string email, string password) - Logins a customer into their account.
  • CreateCustomer(string firstName, string lastName, string email, string password) - Will Only Create a brand new customer account in sandbox.
  • GetDefaultPaymentOptions - Gets a list of a customer default payment options.
  • GetCustomer - Get your customer profile, this is used to get your paymentDetailID to place a order.
  • GetMerchants - Get a list of currently accepted merchants with merchant sell percentages agreed upon with your Account Manager, you must be LOGGED IN to see your sell percentages.
  • RetrieveCart - Will return a cart if one exists in the system.
  • CreateCart - Will return a cart if one exists in the system with it's cards or create a new empty cart.
  • DeleteCart(string cartID) - Delete an entire cart.
  • AddCardToCart(string cartID, int merchantID, double cardValue, string cardNum = null, string cardPin = null, string refID = null) - Add Cart to a Cart, Cards must be added one-by-one there is no bulk method.
  • UpdateCardInCart(string cartID, string cardID, double cardValue = 0, string cardNum = null, string cardPin = null, string refID = null) - Update a Card in a cart.
  • DeleteCardInCart(string cartID, string cardID) - Delete a given card in a cart.
  • PlaceOrder(string cartID, int paymentDetailID, string firstName, string lastName, string street, string city, string state, string postcode, string street2 = null) - Place your order.
  • GetOrder(string orderID) - Get a single order details using the orders id
  • GetAllOrders - Get a list of orders you've placed to CardCash.
  • GetOrderCards(string orderID) - Get a list of cards associated with a given order
  • GetAllCards - Get a list of all the cards that you've sold to CardCash.
  • GetAllPayments - Get a summary of all the Payments paid to you.
  • GetPayment(string paymentID) - Get more details for single payment.

Note: All Optional Parameters are set to null or 0.

Order Status

  • Pending - Your order is pending and is waiting for the payment to be processed.
  • Review2 - Cards are going through the various checks required for sale.
  • Review3 - Possible balance issues
  • Review - This is where we enter it into our inventory system/ or order has an issue and customer will be contacted
  • Processing - Your order is being prepared for shipment.
  • On Payment Queue - Payment is being processed
  • Payment Initiated - Payment sent to customer
  • Paid - Customer has been successfully paid

Note: Pending is the only available order status in Sandbox.

Usage

You need to import the CardCash_API library

You need to initialize a new API class API(string appID, Boolean isProduction = false, Boolean debug = false)

To Create new connection to sandbox: CC_API = new API(appID, false, false);

To Create new connection to production: CC_API = new API(appID, true, false);

To debug CardCash Cookies with CardCash help: CC_API = new API(appID, false, true);

IT IS HIGHLY RECOMMENDED TO ALWAYS START WITH A CUSTOMER LOGIN CALL - YOU CAN'T GET YOUR MERCHANT PRICING, SAVE YOUR CART, OR PLACE A ORDER WITHOUT BEING LOGGED IN!

CC_API.CustomerLogin(emailAddr, pwd);

Examples

Place a Order

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages