定制 foodticket/deliveroo 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

foodticket/deliveroo

最新稳定版本:v0.0.14

Composer 安装命令:

composer require foodticket/deliveroo

包简介

A PHP client to integrate with the Deliveroo API

README 文档

README

This package allows you to easily make requests to the new Deliveroo API. The full documentation of the Deliveroo API can be found here: https://api-docs.deliveroo.com/v2.0/reference/credentials.

Requirements

  • PHP >= 8.2
  • Laravel >= 11.0

Installation

You can install the package via composer:

composer require foodticket/deliveroo

The package will automatically register itself.

Configuration

To start using the Deliveroo API you will need a client ID and client secret. You can get these by creating an app on the Deliveroo Developer Portal. Add the Client ID and client secret to your .env file:

DELIVEROO_BASE_URL=
DELIVEROO_AUTH_URL=
DELIVEROO_CLIENT_ID=
DELIVEROO_CLIENT_SECRET=
DELIVEROO_WEBHOOK_SECRET=

Making requests

Getting orders

To get all orders from a restaurant, you can use the following code:

$deliverooApi = new DeliverooApi();
$deliverooApi->getOrders($brandId, $restaurantId);

Create your own request

If you need to create your own request, you can use the following code:

$deliverooApi = new DeliverooApi();
$deliverooApi->request()->get('https://api.developers.deliveroo.com/order/v1/integrator/brands/{$brand_id}/sites-config');

Webhooks

To start receiving webhooks from Deliveroo, you need to add the following route the App\Providers\RouteServiceProvider file:

$this->routes(function () {
    // ...
    Route::deliverooWebhooks();
});

Security Vulnerabilities

If you discover a security vulnerability within this project, please email me via developer@foodticket.nl.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-04