maksekeskus / maksekeskus-php
Maksekeskus PHP SDK
v1.4.4
2022-09-06 10:52 UTC
Requires
- php: >=5.3.0
- ext-curl: *
- ext-json: *
- nategood/httpful: *
This package is not auto-updated.
Last update: 2024-09-20 01:07:37 UTC
README
## 安装
Composer
{ "repositories": [ { "type": "vcs", "url": "https://github.com/maksekeskus/maksekeskus-php" } ], "require": { "maksekeskus/maksekeskus-php": "v1.4.4" } }
预构建包
从仓库 [发行版] 下载打包的库 [releases] (https://github.com/maksekeskus/maksekeskus-php/releases/).
将其解压缩到您的项目文件夹中(例如 /htdocs/myshop/)并包含库文件(例如 /htdocs/myshop/Maksekeskus-1.4.4/Maksekeskus.php)
从 merchant.maksekeskus.ee 或 merchant.test.maksekeskus.ee 获取您的API密钥
示例
<?php require __DIR__ . '/maksekeskus-1.4.4/vendor/autoload.php'; //Comment this line out if you are using Composer to build your project use Maksekeskus\Maksekeskus; // get your API keys from merchant.test.maksekeskus.ee or merchant.maksekeskus.ee $shopId = '12ee0036-3719-...-9a8b-51f5770190ca'; $KeyPublishable = '5wCSE2B2OAV6...cpe2N1kZQzCXNTe'; $KeySecret = 'JvH2IZ6W6fvKB7W7...ea3BLWgqcfbhQKEN1w2UDrua3sWlojPGfhp'; // use TRUE if working against the Test environment // see https://makecommerce.net/en/for-developers/test-environment/ $MK = new Maksekeskus($shopId,$KeyPublishable,$KeySecret,TRUE); $context["currency"]="eur"; $context["country"]="ee"; $data = $MK->getPaymentMethods($context); print "<pre>"; print_r($data); print "</pre>"; ?>
在 https://developer.maksekeskus.ee/ 上查看更多示例