Download and install the php SDK and intro to its structure.
Initialize the library
With the API key in hand, you can initialize the Tradenity client. Tradenity client needs the API key and an instance of AuthTokenHolder which is an object that makes Tradenity session integrates with the web framework’s session mechanism. The SDK provide implementation for Laravel and Symfony and it’s easy to implement your own.
Make sure to replace the api keys with the ones for your store, otherwise you will get authentication error
Introducing Camera Store sample application
CameraStore application is a typical e-store web application, a web store for a camera shop.
The application code is placed into camerastore
package, which is divided into these modules
ShopController
: navigating the and browsing the store, the corresponding templates are in theresources/views/store
directory.CartController
: Shopping cart manipulation code. the corresponding templateresources/views/store/cart.blade.php
.AccountsController
,SessionController
: login management and registering new customers. the corresponding templates are in theresources/views/account
directory.OrdersController
: placing new order, viewing list and details of customer’s past orders. the corresponding templates are in theresources/views/orders
directory.