承接 thiio/active-campaign-php-sdk 相关项目开发

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

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

thiio/active-campaign-php-sdk

最新稳定版本:0.0.2

Composer 安装命令:

composer require thiio/active-campaign-php-sdk

包简介

This is a SDK built in PHP for consuming Active Campaing's v3 API as detailed in https://www.activecampaign.com/

README 文档

README

Implementation for consuming ActiveCampaign's v3 API

Note:

This is a beta version for this library, the main goal is to consume the ActiveCampaign's V3 API.

Required

An ActiveCampaign's account is required. You can sign up https://www.activecampaign.com/

Installation


Models Implemented

  • Contacts
  • Tags
  • Lists
  • Group List
  • Connections
  • E-Commerce Customers
  • E-Commerce Orders

Example of using this library

//YOUR ACTIVE CAMPAIGN CREDENTIALS
$url = "<https://YOUR_USER.api-us1.com>";
$key = "<YOUR_TOKEN_KEY>";

//Initialize a new instance of active campaign library class
$client = new ActiveCampaign();
$client->initialize($url, $key);

/* 
Instanciate a contact model and add values to the attributes specified on:

https://developers.activecampaign.com/reference#contact 

*/
$contact = new ActiveCampaignContact();
$contact->setEmail("jhon_doe@gmail.com");
$contact->setFirstName("Jhon");
$contact->setLastName("Doe");
$contact->setPhone("+529985656464");

//Fetch contacts class and perform the create request
$contacts = $client->contacts();

try{
    //Perform create request sending the contact model
     $response = $contacts->create($contact);
    
    //If response success var_dump all content
    if($response->success){
    
        echo "Contact successfully created \n";
        var_dump($response->body->contact);
        
    }else{
        //If any error or message is present print it out
        if(isset($response->body->message)){
            echo $message;
        }
        if(isset($response->body->errors)){
            foreach($response->body->errors as $error){
                echo $error->title."\n";
                echo $error->detail."\n";
                echo $error->code."\n";
            }
        }
        
    }
}catch(Exception $e){
    echo $e->getMessage();
}

For more examples go to examples folder inside the project

This repository was forked from https://github.com/DevelopFer/active-campaign-v3-api-php

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-29