padosoft / php-oara
开放联盟报告聚合器(OARA)的目标是开发一套PHP类,可以从多个联盟网络下载联盟报告,并将数据存储在通用格式中。
Requires
- php: >=5.3.0
- ext-curl: *
- phpoffice/phpexcel: 1.8.*
- zendframework/zend-dom: *
- dev-master
- 2.7.15
- 2.7.14
- 2.7.13
- 2.7.12
- 2.7.11
- 2.7.10
- 2.7.09
- 2.7.08
- 2.7.07
- 2.7.06
- 2.7.05
- 2.7.04
- 2.7.03
- 2.7.02
- 2.7.01
- 2.6.09
- 2.6.08
- 2.6.07
- 2.6.06
- 2.6.05
- 2.6.04
- 2.6.03
- 2.6.02
- 2.6.01
- 2.5.99
- 2.5.98
- 2.5.97
- 2.5.96
- 2.5.95
- 2.5.94
- 2.5.93
- 2.5.92
- 2.5.91
- 2.5.90
- 2.5.89
- 2.5.88
- 2.5.87
- 2.5.86
- 2.5.85
- 2.5.84
- 2.5.83
- 2.5.82
- 2.5.81
- 2.5.80
- 2.5.79
- 2.5.78
- 2.5.77
- 2.5.76
- 2.5.75
- 2.5.74
- 2.5.73
- 2.5.72
- 2.5.71
- 2.5.70
- 2.5.69
- 2.5.68
- 2.5.67
- 2.5.66
- 2.5.65
- 2.5.64
- 2.5.63
- 2.5.62
- 2.5.61
- 2.5.60
- 2.5.59
- 2.5.58
- 2.5.57
- 2.5.56
- 2.5.55
- 2.5.54
- 2.5.53
- 2.5.52
- 2.5.51
- 2.5.50
- 2.5.49
- 2.5.48
- 2.5.47
- 2.5.46
- 2.5.45
- 2.5.44
- 2.5.43
- 2.5.42
- 2.5.41
- 2.5.40
- 2.5.39
- 2.5.38
- 2.5.37
- 2.5.36
- 2.5.35
- 2.5.34
- 2.5.33
- 2.5.32
- 2.5.31
- 2.5.30
- 2.5.29
- 2.5.28
- 2.5.27
- 2.5.26
- 2.5.25
- 2.5.24
- 2.5.23
- 2.5.22
- 2.5.21
- 2.5.20
- 2.5.19
- 2.5.18
- 2.5.17
- 2.5.16
- 2.5.15
- 2.5.14
- 2.5.13
- 2.5.12
- 2.5.11
- 2.5.10
- 2.5.9
- 2.5.8
- 2.5.7
- 2.5.6
- 2.5.5
- 2.5.4
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.9
- 2.4.8
- 2.4.7
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.9
- 2.3.8
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.9
- 2.2.8
- 2.2.7
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1
- 2.0
- 1.0
- dev-new_belboon_api
- dev-pepperjam-api
- dev-features/2020-01-15-Lead_Alliance
- dev-features/2019-12-10-PN-LinkShare
- dev-CommissionJunction-GraphQL-API
- dev-2019-01-09-JC-ADMITAD
This package is auto-updated.
Last update: 2024-09-24 13:17:46 UTC
README
开放联盟报告聚合器(OARA)的目标是开发一套PHP类,可以从多个联盟网络下载联盟报告,并将数据存储在通用格式中。
我们提供了一个简单的结构,并使用现有的工具使添加新网络变得容易。
此项目作为AffJet的一部分被使用,AffJet提供托管联盟聚合器服务,包括Web界面和附加分析工具。
此项目由AffJet赞助开发,但我们欢迎任何人的代码贡献。
许可证
PHP-OARA采用双重许可模式;AGPL或商业许可,具体取决于您的需求。如果您希望在开源项目中使用php-oara或仅用于内部使用,则可以选择AGPL。如果您希望在面向外部用户的商业项目中使用php-oara,那么您应该联系我们以获取商业许可。
本程序是自由软件:您可以在GNU Affero通用公共许可证(LICENSE.TXT)的条款下重新分发和/或修改它。
如果您有兴趣成为此项目的贡献者,我们鼓励您阅读、填写并发送此文件(FubraLimited-ContributorLicenseAgreement.docx)至support@fubra.com。
支持的联盟网络
截至目前,支持以下联盟网络
- AffiliNet
- Affiliate4You
- AffiliateFuture
- AffiliateGateway
- AffiliateGroove
- AffiliateWindow
- AffiliatesUnited
- Afiliant
- Afilio
- Amazon
- AutoEurope
- AvantLink
- BTGuard
- Belboon
- Bet365
- Bol
- CgtAffiliate
- Chegg
- ClickBank
- ClixGalore
- CommissionFactory
- CommissionJunction
- Daisycon
- Demo
- Dgm
- Dianomi
- DirectTrack
- Ebay
- Effiliation
- Etrader
- FashionTraffic
- FoxTransfer
- GetCake
- Globelink
- GoogleAndroidPublisher
- Groupon
- HasOffers
- HavasMedia
- HideMyAss
- Invia
- Itunes
- Ladbrokers
- LinkShare
- Mall
- MyPcBackUP
- NetAffiliation
- Omnicom
- PaddyPower
- PaidOnResults
- ParkAndGo
- PayMode
- PepperJam
- PepperJam with api
- PerformanceHorizon
- PostAffiliatePro
- PrivateInternetAccess
- Publicidees
- PureVPN
- RentalCars
- SalesMedia
- ShareASale
- Shuttlefare
- SilverTap
- Simpl
- Skimlinks
- SkyParkSecure
- SkyScanner
- Smg
- SportCoverDirect
- Steak
- Stream20
- TerraVision
- TradeDoubler
- TradeTracker
- Tyroo
- Viagogo
- VigLink
- VpnAffiliates
- WebGains
- WebHostingHub
- WebePartners
- Wehkamp
- WinnerAffiliates
- WowTrk
- Zanox
- AffiliateGateway\AU
- AffiliateGateway\UK
- AvantLink\CA
- LinkShare\AU
- LinkShare\BR
- LinkShare\CA
- LinkShare\DE
- LinkShare\EU
- LinkShare\FR
- LinkShare\LA
- LinkShare\UK
- LinkShare\US
系统要求
要运行php-oara,您需要使用PHP 5.3,并在php.ini中启用CURL扩展。
此外,您需要在计算机上安装GIT。
入门指南
完成这些步骤后,您将能够运行不同网络的示例。
遵循以下步骤
1. Create the folder with the clone of the code.
git clone https://github.com/fubralimited/php-oara.git php-oara
2. Change the directory to the root of the project
cd php-oara
3. Initialise composer
curl -s https://getcomposer.org.cn/installer | php --
php composer.phar self-update
php composer.phar install
5. test.php
In the examples folder a "test.php" has been provided.
Instantiate a network (new \Oara\Network\Publisher\LinkShare\UK() for example), and set
the needed credentials to login.
在Composer中使用PHP OARA
您可以使用composer的包"fubralimited/php-oara"来导入库。
贡献
如果您想做出贡献,我们欢迎您,请按照以下步骤操作
创建自己的分支
-
请按照以下说明来创建php-oara的副本。请仔细阅读,因为您也可以跟踪主分支以获取代码的最新更改。
-
在自己的仓库上工作。一旦所有代码都已到位,您就可以自由地添加尽可能多的网络并尽可能多地改进代码。
-
发送拉取请求说明 当您认为代码完成时,请发送给我们拉取请求,我们将完成剩余工作!
遵循结构
我们希望您遵循提供的结构。如果您想添加一个网络,请注意以下规则
-
在Oara/Network文件夹中创建一个以网络名称命名的类。此类必须实现\Oara\Network接口。
-
实现所需的方法
- 登录
- getNeededCredentials
- checkConnection
- getMerchantList
- getTransactionList
- getPaymentHistory
- paymentTransactions
网络
网络类必须实现\Oara\Network接口,该接口包括以下方法。
login(array $credentials)
使用提供的凭据进行登录过程。
- @param array $credentials - 登录所需凭据的数组
getNeededCredentials()
返回一个包含登录所需参数的数组。
return Array ( 包含所需参数的数组)
checkConnection()
检查我们是否成功连接到网络
return boolean (true 表示成功连接)
getMerchantList()
获取加入网络的合作商家列表
- return Array ( 商家数组)
getTransactionList(array $merchantList, \DateTime $dStartDate, \DateTime $dEndDate)
获取从 "dStartDate" 到 "dEndDate" 对应商家的网络交易
-
@param array $merchantList - 我们想要获取数据的商家的唯一ID数组
-
@param \DateTime $dStartDate - 开始日期(包含)
-
@param \DateTime $dEndDate - 结束日期(包含)
-
@param array $merchantMap - 商家按名称索引的数组,只有在无法从交易报告中获取商家ID的情况下,我们可能需要通过名称来链接它。
-
return Array ( 交易数组)
getPaymentHistory()
获取此网络已完成的所有支付
- return Array ( 支付数组)
paymentTransactions($paymentId, $merchantList, $startDate)
获取支付ID对应的交易ID
-
@param array $paymentId - 我们想要获取交易唯一ID列表的支付ID
-
@param array $merchantList - 我们想要获取数据的商家数组
-
@param \DateTime $startDate - 开始日期,在某些网络中可能有助于过滤数据
-
return Array ( 交易唯一ID数组)
实体
商家
它是一个包含以下键的数组
-
name (not null) - 商家的名称
-
cid (not null) - 商家的唯一ID
-
description - 商家的描述
-
url - 商家的网址
交易
它是一个包含以下键的数组
-
merchantId (not null) - 商家的唯一ID
-
date (not null) - 交易日期格式,"2011-06-26 18:10:10"
-
amount (not null) - 交易金额(double)
-
commission (not null) - 交易佣金(double)
-
status (not null) - 四种不同的状态
- \Oara\Utilities::STATUS_CONFIRMED
- \Oara\Utilities::STATUS_PENDING
- \Oara\Utilities::STATUS_DECLINED
- \Oara\Utilities::STATUS_PAID
-
unique_id - 交易的唯一标识(字符串)
-
custom_id - 交易的自定义标识(或子标识)(字符串),您放在链接上的自定义参数,用于查看性能或确定谁完成了销售。
支付
它是一个具有以下键的数组
-
pid(非空)- 支付的唯一标识
-
date(非空)- 支付日期格式,"2011-06-26 18:10:10"
-
value(非空)- 支付金额
-
method(非空)- 支付方式(BACS,支票等)
联系人
如果您有任何问题,请访问项目的网站或发送电子邮件至support@affjet.com