承接 wddyousuf/paperfly 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

wddyousuf/paperfly

Composer 安装命令:

composer require wddyousuf/paperfly

包简介

This package is an API integration for paperfly courier

README 文档

README

a package for Paperfly Courier Integration for Laravel Developer.

Step 1

composer require wddyousuf/paperfly
php artisan vendor:publish --provider=Wddyousuf\Paperfly\PaperflyServiceProvider
php artisan config:cache

This will create a courier.php in the config/ directory. Set your desired provider as default_provider and fill up the necessary environment variable of that provider.

Step 2

Set .env configuration

COURIER_USERNAME="XXXXXXXX"
COURIER_PASSWORD="XXXXXXXXXX"
COURIER_API_KEY="Paperfly_~La?Rj73FcLm"
COURIER_PROVIDER="PAPERFLY"

Sample Code For Requesting a Pick Up

use Wddyousuf\Paperfly\Facades\PaperflyCourier;

$OrderInformation=[
    "OrderNo" => "111111",
    "MerchantName" => "Mr. X",
    "MerchantAddress" => "Test",
    "MerchantThana" => "Dhanmondi",
    "MerchantDistrict" => "Dhaka",
    "MerchantPhone" => "017xxxxx",
    "SizeWeight" => "standard",
    "productDetails" => "Usb Fan",
    "packagePrice" => "0",
    "deliveryType" => "regular",
    "CustomerName" => "Mr. Y",
    "CustomerAddress" => "Road 27, Dhanmondi",
    "CustomerThana" => "Adabor",
    "CustomerDistrict" => "Dhaka",
    "CustomerPhone" => "017xxxxx",
    "max_weight" => "10",
];
$response = PaperflyCourier::sendRequest($OrderInformation);

//Collect Thana list from paperfly
//Collect District list from paperfly
// max_weight is only for weight Enabled Pickup Request
//If Thana and District doesn't match with paperfly list,It will occur error

Sample Code For Tracking an Order

use Wddyousuf\Paperfly\Facades\PaperflyCourier;

$orderId='XXXXXXX';
$response = PaperflyCourier::trackOrder($orderId);

Sample Code For Invoice

use Wddyousuf\Paperfly\Facades\PaperflyCourier;

$orderId='XXXXXXX';
$response = PaperflyCourier::courierInvoice($orderId);

Sample Code For Cancel Order

use Wddyousuf\Paperfly\Facades\PaperflyCourier;

$orderId='XXXXXXX';
$response = PaperflyCourier::CourierOrderCancel($orderId);

License

MIT

If you feel something is missing then make a issue regarding that. Your can pull reques. If you want to contribute in this library, then you are highly welcome to do that....

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固