forked from ecoleman/spreedly-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
56 lines (42 loc) · 1.64 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Spreedly PHP API
Luke Ehresman - http://luke.ehresman.org
This set of classes provides a convenienet wrapper around the Spreedly
API (http://spreedly.com). Instead of dealing with HTTP directly with
CURL, you can use these objects to handle everything for you. Some
examples are provided, but for some really good examples, check out
the unit tests.
*************************************************
* Consulting services are available to help *
* integrate this with your site or project: *
* http://www.tebros.com *
*************************************************
Report any issues in GitHub:
http://github.com/lehresman/spreedly-php/issues
CONTRIBUTORS
============
Luke Ehresman - http://luke.ehresman.org
Beau West - http://beaudesigns.net
Christoffer Lejdborg - http://www.lejdborg.se
thejohnny
REQUIREMENTS
============
php (version 5.2 for SpreedlySubscriber::update functionality)
mod_curl
mod_ssl
INSTALL
=======
Simply copy class.spreedly.inc into your include path on your web server
and include it in your PHP scripts.
EXAMPLE #1 - Creating a subscriber with a free trial
====================================================
Spreedly::configure($my_site_name, $my_site_token);
$sub = SpreedlySubscriber::create(78, "test@nospam.com", "testUser");
$sub->activate_free_trial($trial_plan_id);
EXAMPLE #2 - Getting a user and comping a month
===============================================
Spreedly::configure($my_site_name, $my_site_token);
$sub = SpreedlySubscriber::find(78);
$sub->comp(1, "months", "full");
MORE EXAMPLES
=============
For more examples, see the unit tests in the test directory.