承接 jplarar/enviapaqueteria-bundle 相关项目开发

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

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

jplarar/enviapaqueteria-bundle

Composer 安装命令:

composer require jplarar/enviapaqueteria-bundle

包简介

A simple Symfony2 bundle for Envia API.

README 文档

README

A simple Symfony2 bundle for the API for Envia Paqueteria API.

Setup

Step 1: Download JplararEnviapaqueteriaBundle using composer

Add SES Bundle in your composer.json:

{
    "require": {
        "jplarar/enviapaqueteria-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update "jplarar/enviapaqueteria-bundle"

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Jplarar\EnviapaqueteriaBundle\EnviapaqueteriaBundle()
    );
}

Step 3: Add configuration

# app/config/config.yml
jplarar_enviapaqueteria:
        enviapaqueteria_keys:
              enviapaqueteria_user:    %enviapaqueteria_user%
              enviapaqueteria_password: %enviapaqueteria_password%
              enviapaqueteria_environment: %enviapaqueteria_environment% # 'prod' or 'dev'

Usage

Using service

<?php
        $enviapaqueteriaClient = $this->get('enviapaqueteria_client');
?>

##Example

###Generate Quote

<?php 
    $quotes = $enviapaqueteriaClient->quote(
                    $origin = [
                        "representative" => "Origen test",
                        "company" => "Origen Empresa",
                        "email" => "correo@pruebas.com",
                        "phone" => "8111234567",
                        "country" => "MX",
                        "address1" => "av vasconcelos",
                        "address2" => "1400",
                        "addressExtra" => "enfrente de office depot",
                        "zipCode" => "66240"
                    ], 
                    $destination = [
                        "representative" => "Destino test",
                        "company" => "Origen Empresa",
                        "email" => "correo@pruebas.com",
                        "phone" => "8111234567",
                        "country" => "MX",
                        "address1" => "av vasconcelos",
                        "address2" => "1400",
                        "addressExtra" => "enfrente de office depot",
                        "zipCode" => "66240"
                    ], 
                    $options = [
                        "content" => "vestido",
                        "insurance" => 0,
                        "value" => "",
                        "height" => 10,
                        "width" => 10,
                        "length" => 10,
                        "weight" => 2,
                        "amount" => 1,
                        "collection" => null,
                        "collection_time" => "",
                        "collection_time_limit" => "",
                        "collection_date" => ""
                    ]
            );
            
    $shipping = $enviapaqueteriaClient->create(
                    $provider = [
                        "name" => "fedex",
                        "service" => "FEDEX_EXPRESS_SAVER"   
                     ],
                    $origin = [
                        "representative" => "Origen test",
                        "company" => "Origen Empresa",
                        "email" => "correo@pruebas.com",
                        "phone" => "8111234567",
                        "country" => "MX",
                        "address1" => "av vasconcelos",
                        "address2" => "1400",
                        "addressExtra" => "enfrente de office depot",
                        "zipCode" => "66240"
                    ], 
                    $destination = [
                        "representative" => "Destino test",
                        "company" => "Origen Empresa",
                        "email" => "correo@pruebas.com",
                        "phone" => "8111234567",
                        "country" => "MX",
                        "address1" => "av vasconcelos",
                        "address2" => "1400",
                        "addressExtra" => "enfrente de office depot",
                        "zipCode" => "66240"
                    ], 
                    $options = [
                        "content" => "vestido",
                        "insurance" => 0,
                        "value" => "",
                        "height" => 10,
                        "width" => 10,
                        "length" => 10,
                        "weight" => 2,
                        "amount" => 1,
                        "collection" => null,
                        "collection_time" => "",
                        "collection_time_limit" => "",
                        "collection_date" => "",
                        "file" => "PDF",
                        "paper" => "PAPER_7X4.75",
                    ]
                );
?>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固