adjemin/smartlivraison-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

adjemin/smartlivraison-php

Composer 安装命令:

composer require adjemin/smartlivraison-php

包简介

Smart Livraison PHP Library

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

The Smart Livraison PHP library provides convenient access to the Smart Livraison API from applications written in the PHP language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses which makes it compatible with a wide range of versions of the Smart Livraison API

Requirements

PHP 5.6.0 and later.

Composer

You can install the bindings via Composer. Run the following command:

composer require adjemin/smartlivraison-php

Getting Started

Simple usage looks like:

Create Merchant Task and Assign to Delivery service

$customer_name = "Ange Bagui"; 
$customer_phone = "+22501000000";
$customer_email = "";
$location_name = "Immeuble Maiko, Rue L84, 8ᵉ tranche, Caféier, Cocody, Abidjan, 28, Côte d'Ivoire";
$location_latitude = 5.396215700000001; 
$location_longitude = -3.9768630282901785; 
$order_id = "1ebf79e3-da47-4f73-aefc-9557afa22e33";
$order_description = "Savon 200g Catégorie: Beauté Quantité: 1";
$order_price = "2000";
$currency_code = "XOF";
$has_pickup = true;
$delivery_fees = "1500";

$job_datetime = "2020-07-15 11:35:51";

$images = ["https://i.imgur.com/UbFukAq.jpg"];
$description = "Ramassage ";

$pickup = SmartLivraison::paramJob(
    $customer_name, 
    $customer_phone,
    $customer_email,
    $location_name, 
    $location_latitude, 
    $location_longitude, 
    $order_id, 
    $order_description,
    $order_price,
    $currency_code,
    $has_pickup,
    $delivery_fees,
    $job_datetime ,
    $images,
    $description
);

$customer_name = "Ange Bagui"; 
$customer_phone = "+22501000000";
$customer_email = "";
$location_name = "Pharmacie du Bonheur, Rue I168, Riviéra Palmeraie, Les Palmeraies, Palmeraie, Cocody, Abidjan, BP 51 CIDEX 3 ABIDJAN, Côte d'Ivoire";
$location_latitude = 5.3695041; 
$location_longitude = -3.9590591; 
$order_id = "1ebf79e3-da47-4f73-aefc-9557afa22e33";
$order_description = "Savon 200g Catégorie: Beauté Quantité: 1";
$order_price = "2000";
$currency_code = "XOF";
$has_pickup = false;
$delivery_fees = "1500";
$job_delivery_datetime =  "2020-07-15 13:35:51";
$images = ["https://i.imgur.com/UbFukAq.jpg"];
$description = "Livraison ";

$delivery = SmartLivraison::paramJob(
    $customer_name, 
    $customer_phone,
    $customer_email,
    $location_name, 
    $location_latitude, 
    $location_longitude, 
    $order_id, 
    $order_description,
    $order_price,
    $currency_code,
    $has_pickup,
    $delivery_fees,
    $job_delivery_datetime,
    $images,
    $description
);

 $client_id = '11211111'; //Your CLIENT ID
 $client_secret = '10997210-b096-4dd7-b834-837856e4fe25'; //Your CLIENT SECRET
 $smartLivraison = new SmartLivraison($client_id, $client_secret);

 $merchant_id = "21121"; //Your merchant ID
 $merchant_notification_url = "http://example.com/sl_notify"; //Your merchant notification url

 $delivery_service_username = "adjemin"; // The username of the delivery service in Smart Livraison
 $customer_payment_method_code = "cash"; //cash or online
 $customer_paid = false; // if true so the customer will not paid at the delivery

/** var array $result */
$result = $smartLivraison->merchantCreateTask(
                            $merchant_id,
                            $pickup,
                            $delivery,
                            $delivery_service_username,
                            $customer_payment_method_code, 
                            $customer_paid,
                            $merchant_notification_url
                        );

统计信息

  • 总下载量: 41
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固