承接 programster/leaddyno 相关项目开发

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

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

programster/leaddyno

最新稳定版本:0.2.1

Composer 安装命令:

composer require programster/leaddyno

包简介

An SDK for interfacing with the Leaddyno RESTful API

README 文档

README

An SDK for interfacing with the LeadDyno RESTful API in PHP.

This package makes use of the PSR-17 and PSR-18 interfaces, so this package should be able to work with any existing mechanism you use to send messages. If you are not sure what this means, then we would recommend that you just install the guzzlehttp/guzzle package, and follow the example in the README.

Usage

Installation

Install this in your codebase with composer like so:

composer require programster/leaddyno

Example Code

The following example creates a LeadDyno client, and uses it to tell LeadDyno that there was a sale that was the result of a specific affiliate code.

<?php

use Programster\LeadDyno\LeadDyno;
use Programster\LeadDyno\LineItem;
use Programster\LeadDyno\LineItemCollection;

require_once(__DIR__ . "/../vendor/autoload.php");

$myLeadDynoApiKey = "xxxxxxxxxxxxxxxxxxxxxxxxxx";

$leadDyno = new LeadDyno(
    $myLeadDynoApiKey,
    new \GuzzleHttp\Psr7\HttpFactory(),
    new \GuzzleHttp\Client(),
);

$lineItems = new LineItemCollection(
    new LineItem(
        sku: "Botswana1",
        description: "A ticket to Botswana",
        quantity: "1",
        amount: "123.45",
    ),
);

$response = $leadDyno->createPurchase(
    customerEmail: "test-customer@somedomain.com",
    purchaseAmount: 123.45,
    purchaseId: "9eb2d2b1-f4fb-4b2c-84e3-688f950db50d",
    planCode: "Default",
    affiliateCode: "someAffiliateCode",
    description: "Description of purchase goes here.",
    lineItems: $lineItems,
);

if ($response->getStatusCode() === 201)
{
    // Purchase succssfully registered...
}
else
{
    // Handle error response here...
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固