Download the PHP package codebuglab/laravel-like4card without Composer

On this page you can find all versions of the php package codebuglab/laravel-like4card. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-like4card

Laravel Like4Card

Integrate Like4Card api with Laravel.

Table of Contents

Installation

Require via composer

In config/app.php file

Config

Add your info to .env file

The config file looks like

Available api methods

Get merchant balance

Operation that help the merchant to get his balance and user Id.

$response is an Object with the following parameters

Parameter Description
response 1 for success, 0 for failure
userId merchant account identifier
balance merchant account balance
currency

Categories

Operation to get all categories available for this merchant.

$response is an Array with the following parameters

Parameter Description
id -
categoryParentId -
categoryName -
amazonImage -
childs Array of sub-categories with same parent category structure

Products by products ids

There's an issue in API request param: This will only get the first ID

Operation to get all products available by an array of products identifiers.

$response is an array. Each element is an object with the following parameters

When no products found: $response is a string with error message

Parameter Description
productId -
categoryId -
productName -
productImage -
productCurrency -
productPrice that represents the product price including vat that the merchant paid for product
productPriceWithoutVat -
sellPrice that represents the price the customer pays for the product to the merchant.
sellPriceWithoutVat -
available determines if stock for this product is available or not.
optionalFieldsExist 1 optional fields required, 0 there are no required optional fields.
productOptionalFields array of optional fields where
vatAmount -
vatPercentage -

Each optional field has

Parameter Description
id identifier of the optional field
required '1' means it's required, '0' means it's optional and not required
defaultValue default value for this field
hint placeholder for this field
label label displayed on top of this field on UI
fieldTypeId 1 plaintext ,7 email address, 10 phone number ,other number plaintext
fieldCode
options array of choices in case option is multi choice field

Products by category

Operation to get all products available by category id.

$response is an array. Each element is an object with the following parameters.

When no products found: $response is a string with error message

Parameter Description
productId -
categoryId -
productName -
productImage -
productCurrency -
productPrice that represents the product price including vat that the merchant paid for product
productPriceWithoutVat -
sellPrice that represents the price the customer pays for the product to the merchant.
sellPriceWithoutVat -
available determines if stock for this product is available or not.
optionalFieldsExist 1 optional fields required, 0 there are no required optional fields.
productOptionalFields array of optional fields where
vatAmount -
vatPercentage -

Each optional field has

Parameter Description
id identifier of the optional field
required '1' means it's required, '0' means it's optional and not required
defaultValue default value for this field
hint placeholder for this field
label label displayed on top of this field on UI
fieldTypeId 1 plaintext ,7 email address, 10 phone number ,other number plaintext
fieldCode
options array of choices in case option is multi choice field

Get all orders

Operation to get all orders made by this merchant. This api can receive the following options:

Parameter Description
page page number(default is 1), where page size is fixed value of 100 order per page
order_type desc or asc, arranged by order create date orderCreateDate
from get all orders with create date bigger than this timestamp
to get all orders with create date less than this timestamp

$response is an Object with the following parameters

Parameter Description
orderNumber -
orderFinalTotal represent the price the merchant will pay for LikeCard for this order
currencySymbol -
orderCreateDate -
orderCurrentStatus -
orderPaymentMethod -

Get an order info

Operation to get one order details by its id.

$response is an Object with the following parameters

Parameter Description
response 1 for success, 0 for failure
serials array of objects, each object represent a purchased product details.

each serial object has

Parameter Description
serialCode is the encrypted serial given to customer to be used
serialNumber is the card manufacturing No
validTo is the validation time for card

Create new order

Operation to create new order. This api can receive the following parameters:

Parameter Description
product_id product identifier Required
reference_id merchant reference (Required and must be unique)
quantity always 1

$response is an Object with the following parameters

Parameter Description
response 1 for success, 0 for failure

API Exceptions

If the API response = 0, the service throws an exception. It could be one of the following exceptions

Wrong credentials

It been thrown if you enter wrong deviceId, username, password or securityCode.

example

Products not available

It's been thrown if no products found with given category id or products ids array

example

License

Laravel Like4Card is a free software distributed under the terms of the MIT license.


All versions of laravel-like4card with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
illuminate/database Version >=6.20
illuminate/support Version >=6.20
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package codebuglab/laravel-like4card contains the following files

Loading the files please wait ....