rpay/prestashop-pokpay-payments-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rpay/prestashop-pokpay-payments-sdk

最新稳定版本:1.1.0

Composer 安装命令:

composer require rpay/prestashop-pokpay-payments-sdk

包简介

PokPay's Prestashop PHP SDK for Checkout REST APIs

README 文档

README

PokPay's Prestashop PHP SDK for Checkout REST APIs

Installation & Usage

Requirements

PHP 7.0 and later. Should also work with PHP 8.0 but has not been tested.

Composer

$ composer require rpay/prestashop-pokpay-payments-sdk

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/pok-payments-sdk/vendor/autoload.php');

Logging in with API key

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create the configuration for the API calls
// getDefaultConfiguration accepts a parameter to specify whether the production environment is used
// By default the staging environment is used
// The same configuration is later used for all the other API classes
$config = RPay\POK\PaymentsSdk\Configuration::getDefaultConfiguration(true);

$apiInstance = new RPay\POK\PaymentsSdk\Api\AuthApi(
    $config,
    new GuzzleHttp\Client(),
);

$keyId = 'PokPay Key Id';
$keySecret = 'PokPay Key Secret';

$payload = new \RPay\POK\PaymentsSdk\Model\LoginSdkPayload($keyId, $keySecret); // \RPay\POK\PaymentsSdk\Model\LoginSdkPayload

try {
    $result = $apiInstance->login($payload);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthApi->login: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.pokpay.io in the production environment and https://api-staging.pokpay.io in the staging environment

Class Method HTTP request Description
AuthApi login POST /auth/sdk/login Login Sdk
MerchantsApi captureOrder POST /merchants/{merchantId}/sdk-orders/{sdkOrderId}/capture Capture an sdk order
MerchantsApi createOrder POST /merchants/{merchantId}/sdk-orders Create an sdk api order
SdkOrdersApi confirmOrder POST /sdk-orders/{sdkOrderId}/confirm Confirm order.
SdkOrdersApi confirmOrderAsGuest POST /sdk-orders/{sdkOrderId}/guest-confirm Confirm order with guest checkout
SdkOrdersApi getSdkOrderById GET /sdk-orders/{sdkOrderId} Retrieve an order

Models

Authorization

jwt

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

RPay Ltd

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2022-09-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固