ossbrownie / carts-guru
恢复您的遗弃购物车并将其转化为销售额。
0.0.6
2018-05-16 16:43 UTC
Requires
- php: >=5.3
- ext-curl: *
Requires (Dev)
- phpdocumentor/reflection-docblock: 2.0. *
- phpunit/phpunit: 4.8.35
- satooshi/php-coveralls: ^1.0
README
恢复您的遗弃购物车并将其转化为销售额。
curl
PHP的基本CURL包装器(有关PHP的libcurl扩展的更多信息,请参阅https://php.ac.cn/curl)
要求
- PHP >= 5.3
- EXT-CURL = *
用法
$cartsGuru = new CartsGuru( new HTTPClient( new CurlClient(), new Config(array( 'apiAuthKey' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', )) ), 'site-id-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ); $item = new Item(array( 'id' => 'test-item-0008', 'label' => 'product', 'quantity' => 1, 'totalATI' => 200, 'totalET' => 150, 'url' => 'http://site.com/product/0008', 'imageUrl' => 'http://site.com/product/0008.jpg', )); $cart = new Cart( array( 'id' => 'test-cart-0008', 'totalATI' => 200, 'totalET' => 150, 'accountId' => '3847569834', 'firstname' => 'Tester', 'email' => 'test@site.com', 'country' => 'United States', 'countryCode' => 'USA', ) ); $cart->addItem($item); $status = $cartsGuru->trackCart($cart); $order = new Order( array( 'id' => 'test-order-0008', 'cartId' => 'test-cart-0008', 'totalATI' => 200, 'totalET' => 150, 'state' => 'approved', 'accountId' => '3847569834', 'firstname' => 'Tester', 'email' => 'test@site.com', 'country' => 'United States', 'countryCode' => 'USA', ) ); $order->addItem($item); $status = $cartsGuru->trackOrder($order);
联系方式
欢迎提出问题、评论和建议: oss.brownie@gmail.com