The CC.Drive demonstration contains step-by-step instructions for using the API to create your own e-commerce solution.
This project assumes that you have shopping cart capability. The project starts at the point where your customer is about to validate a purchase and ends at the point the purchase is acknowledged or declined by the Internet bank.
Application Scenario
When a customer has selected products to purchase, they click the Submit button to go to check out. The cashier scans the products and declares the total price for the sale. Our project starts here.
The cashier asks the customer for the payment method.
How would you like to pay? Check or credit card? Credit or debit? asks the cashier.
The customer has four possible responses:
Make a one time payment for the full amount using a credit card.
Make 12 months payments using a credit card.
Make a one time payment for the full amount using a check.
Make the first payment with a check, then automatically debit the bank account each month for the next 12 months.
If the customer replies with answer 1 or 2, the cashier asks for the credit card, scans the card through the card machine, and waits for authorization from the card center.
If the card is authorized, the customer is presented with the receipt for the purchase. If the card is not authorized, the customer is asked for a different card or for a different method of payment.
If the customer replies with answer 3 or 4, they write and sign the check and present it to the cashier with a valid picture ID. The cashier checks the validity of the check and the ID card. If the check is valid, the customer receives the merchandise and the receipt. If the check is not valid, the customer must supply a different method of payment or they do not receive the merchandise.
Application Architecture
The application is designed using a driver application. The driver is the only interaction the customer browser has with the Web server. Think of this driver as the cashier. The customer only needs to talk to one person to complete the sale. When the customer submits payment to the cashier, the cashier interacts with the bank to validate the payment. The bank returns the payment information to the cashier who then informs the customer of the payment status. The customer never directly talks to the bank.
This solution allows for a non-persistent connection between the browser and the Web server.
The diagram below illustrates this architecture.