pagamastarde / shopper-library
1.2.1
2018-11-27 16:59 UTC
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: ^4.8
README
购物库 
购物库为连接到 Paga+Tarde 的商店提供了一个使用对象获取支付表单的方法。库为连接到购物服务的每个类型的商店提供存根。与购物服务通信时,包括创建 CURL 请求的客户端。
所有代码都经过外部服务的测试和检查。
如何使用
通过以下方式安装库
- 从这里下载
https://github.com/PagaMasTarde/shopperLibrary/releases/latest
- 使用 Composer
composer require pagamastarde/shopper-library
最后,请确保包含自动加载器
require_once '/path/to/your-project/vendor/autoload.php';
一旦您在项目中准备好库,您将拥有可用的存根对象,同时购物客户端也可用。有关字段说明或必填项检查,请参阅我们的 paymentForm 文档这里
//Create a Prestashop object, for example: $prestashopObject = new PrestashopObjectModule(); //You will need to setup all the mandatory fields at least, find more information in //http://docs.pagamastarde.com/avanzada/formulario/ $prestashopObject ->setEmail('test@email.com') ->setFullName('John Doe') ->setAmount(1234) ; $shopperClient = new ShopperClient(); $shopperClient->setObjectModule($prestashopObject); $apiResponse = $shopperClient->getPaymentForm(); //Print the resulting HTML echo $apiResponse->data-form;
帮助我们改进
我们很高兴接受建议或拉取请求。如果您愿意帮助我们开发更好的软件,请在这里创建拉取请求,遵循 PSR-2 代码风格,我们将使用 reviewable 检查代码,如果所有测试都通过,并且 SensioLab Insights 没有检测到任何问题,则可以合并。