cardcash/cardcash-api-sdk-php
Composer 安装命令:
composer require cardcash/cardcash-api-sdk-php
包简介
CardCash Client Facing API SDK For Partners using PHP
README 文档
README
This is currently a simple CardCash API SDK written in PHP to assist bulk seller partners in communicating with CardCash Client API.
Dependencies
- PHP (>= 5.3)
Install
Package Manager
composer require cardcash/cardcash-api-sdk-php
Requirements
- CardCash Bulk Seller Agreement
- CardCash X-CC-APP-ID
- Bulk Seller Customer Account ( Sandbox can be created via this SDK )
- Default Bank Account w/ Default Payment Method for Bulk Seller Customer Account
Methods
CustomerLogin(string email, string password)- Logins a customer into their account.CreateCustomer(string firstName, string lastName, string email, string password)- Will Only Create a brand new customer account in sandbox.GetDefaultPaymentOptions- Gets a list of a customer default payment options.GetCustomer- Get your customer profile, this is used to get your paymentDetailID to place a order.GetMerchants- Get a list of currently accepted merchants with merchant sell percentages agreed upon with your Account Manager, you must be LOGGED IN to see your sell percentages.RetrieveCart- Will return a cart if one exists in the system.CreateCart- Will return a cart if one exists in the system with it's cards or create a new empty cart.DeleteCart(string cartID)- Delete an entire cart.AddCardToCart(string cartID, int merchantID, double cardValue, string cardNum = null, string cardPin = null, string refID = null)- Add Cart to a Cart, Cards must be added one-by-one there is no bulk method.UpdateCardInCart(string cartID, string cardID, double cardValue = 0, string cardNum = null, string cardPin = null, string refID = null)- Update a Card in a cart.DeleteCardInCart(string cartID, string cardID)- Delete a given card in a cart.PlaceOrder(string cartID, int paymentDetailID, string firstName, string lastName, string street, string city, string state, string postcode, string street2 = null)- Place your order.GetOrder(string orderID)- Get a single order details using the orders idGetAllOrders- Get a list of orders you've placed to CardCash.GetOrderCards(string orderID)- Get a list of cards associated with a given orderGetAllCards- Get a list of all the cards that you've sold to CardCash.GetAllPayments- Get a summary of all the Payments paid to you.GetPayment(string paymentID)- Get more details for single payment.
Note: All Optional Parameters are set to null or 0.
Order Status
- Pending - Your order is pending and is waiting for the payment to be processed.
- Review2 - Cards are going through the various checks required for sale.
- Review3 - Possible balance issues
- Review - This is where we enter it into our inventory system/ or order has an issue and customer will be contacted
- Processing - Your order is being prepared for shipment.
- On Payment Queue - Payment is being processed
- Payment Initiated - Payment sent to customer
- Paid - Customer has been successfully paid
Note: Pending is the only available order status in Sandbox.
Usage
You need to import the CardCash_API library
You need to initialize a new API class API(string appID, Boolean isProduction = false, Boolean debug = false)
To Create new connection to sandbox:
$CC_API = new API(appID, false, false);
To Create new connection to production:
$CC_API = new API(appID, true, false);
To debug CardCash Cookies with CardCash help:
$CC_API = new API(appID, false, true);
IT IS HIGHLY RECOMMENDED TO ALWAYS START WITH A CUSTOMER LOGIN CALL - YOU CAN'T GET YOUR MERCHANT PRICING, SAVE YOUR CART, OR PLACE A ORDER WITHOUT BEING LOGGED IN!
$CC_API->CustomerLogin(emailAddr, pwd);
Examples
cardcash/cardcash-api-sdk-php 适用场景与选型建议
cardcash/cardcash-api-sdk-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 287 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 cardcash/cardcash-api-sdk-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cardcash/cardcash-api-sdk-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 287
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-01-04