fnklabs / monger
Monger php client
1.0.0
2015-01-07 13:08 UTC
Requires
- php: >=5.4
- monolog/monolog: 1.*
Requires (Dev)
- curl/curl: >=1.2
- phpunit/phpunit: 4.*
Suggests
- curl/curl: >=1.2
This package is not auto-updated.
Last update: 2024-12-17 09:06:59 UTC
README
Read more about project at Monger
##Create Client instance
$logger = new Logger("test"); $curlAdapter = new CurlAdapter($logger), $mongerClient = new MongerClient( "https://monger.fnklabs.com", "USER_TOKEN", "USER_ACCESS_TOKEN_WITH_WRITE_SCOPE", "YOUR_APPLICATION_NAME", "YOUR_APPLICATION_VERSION", $curlAdapter, $logger );
##Register new customer
$mongerClient->newCustomer( "CUSTOMER_INTERNAL_ID", "CUSTOMER_INITIALS", "CUSTOMER_EMAIL", "CUSTOMER_PHONE_NUMBER", CUSTOMER_GENDER, "CUSTOMER_COUNTRY", "CUSTOMER_CITY", "CUSTOMER_AGE", new \DateTime(), ["TAG_1", "TAG_2"] );
##Register customer's new activity
$mongerClient->newActivity("CUSTOMER_INTERNAL_ID", "ACTIVITY_NAME", new \DateTime());
##Register customer's new payment
$mongerClient->newPayment("CUSTOMER_INTERNAL_ID", "PAYMENT_INTERNAL_ID", PURCHASE_AMOUNT, new \DateTime());
##Additional info
- You can find example at MongerClientTest
- To retrieve access to Monger Service visit page Monger