定制 mctekk/zohocrm 二次开发

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

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

mctekk/zohocrm

Composer 安装命令:

composer require mctekk/zohocrm

包简介

Wrapper for interact with Zoho CRM API for php

README 文档

README

The Zoho CRM library is a simple wrapper around Zoho API

At MC we work a lot with Zoho and we found ourself repeating the same patter over and over that's why we build this library.

Installation

Using composer, execute the following command to add the requirement to your composer.json

$ composer require mctekk/zohocrm:^0.1

Let's start

Zoho API V2 has change the wey they handle connecto to the API, it now uses OAuth instead of just simple private and public keys. So you will have to do the following things to get this package to work with your app

Todo In future version we will add the refresh_token generator directly as a php script

<?php

use Zoho\CRM\ZohoClient;

$ZohoClient = new ZohoClient(); // Make the connection to zoho api
$ZohoClient->setAuthRefreshToken(getenv('ZOHO_AUTH_REFRESH_TOKEN'));
$ZohoClient->setZohoClientId(getenv('ZOHO_CLIENT_ID'));
$ZohoClient->setZohoClientSecret(getenv('ZOHO_CLIENT_SECRET'));
$refresh = $ZohoClient->generateAccessTokenByRefreshToken();
//or with redis $ZohoClient->manageAccessTokenRedis($redis);

$this->zohoClient->setModule('Leads');

$lead = new Lead();

$leadRequest = [
	'First_Name' => 'Test',
	'Last_Name' => 'Zoho',
	'Phone' => '000000000',
	'Email' => 'testzoho@mctekk.com'
];

$response = $this->zohoClient->insertRecords(
	$leadRequest,
	['wfTrigger' => 'true']
);

$response->getResponseData();

The above values of the $request array can be taken from POST if you are using forms in landing page :D, just be sure that all the keys(name of the field on html) in the array have to be valid properties in the entity Lead of zoho, default properties can be found on documentation here or make sure that those properties exist in your account if you custom your Lead on Zoho; the following convention are made:

  • Name of fields are not CamelCase.
  • Name with space between words, space is substituted by an "_".
  • Need to clean(unset) from the array all the values that are not part of the entity, if you don't wanna make this, create another clean array.

Users of the .eu domain (i.e. your CRM URL is crm.zoho.eu, rather than crm.zoho.com) should call setEuDomain() after instantiating ZohoClient, i.e.

$ZohoClient = new ZohoClient(); // Make the connection to zoho api
$ZohoClient->setAuthRefreshToken(getenv('ZOHO_AUTH_REFRESH_TOKEN'));
$ZohoClient->setZohoClientId(getenv('ZOHO_CLIENT_ID'));
$ZohoClient->setZohoClientSecret(getenv('ZOHO_CLIENT_SECRET'));
$refresh = $ZohoClient->generateAccessTokenByRefreshToken();
$ZohoClient->setEuDomain();
$ZohoClient->setModule('Leads'); // Set the module

mctekk/zohocrm 适用场景与选型建议

mctekk/zohocrm 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 70.57k 次下载、GitHub Stars 达 51, 最近一次更新时间为 2014 年 11 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「Zoho CRM API PHP Wrapper」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mctekk/zohocrm 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mctekk/zohocrm 我们能提供哪些服务?
定制开发 / 二次开发

基于 mctekk/zohocrm 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 70.57k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 52
  • 点击次数: 20
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 51
  • Watchers: 16
  • Forks: 58
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-21