定制 conekta/conekta-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

conekta/conekta-php

Composer 安装命令:

composer require conekta/conekta-php

包简介

Conekta PHP Library

README 文档

README

Conekta sdk

For more information, please visit https://github.com/conekta/openapi/issues.

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/conekta/conekta-php.git"
    }
  ],
  "require": {
    "conekta/conekta-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/conekta/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure Bearer authorization: bearerAuth
$config = Conekta\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Conekta\Api\AntifraudApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$create_rule_whitelist_request = new \Conekta\Model\CreateRuleWhitelistRequest(); // \Conekta\Model\CreateRuleWhitelistRequest | requested field for blacklist rule
$accept_language = es; // string | Use for knowing which language to use

try {
    $result = $apiInstance->createRuleBlacklist($create_rule_whitelist_request, $accept_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AntifraudApi->createRuleBlacklist: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.conekta.io

Class Method HTTP request Description
AntifraudApi createRuleBlacklist POST /antifraud/blacklists Create blacklisted rule
AntifraudApi createRuleWhitelist POST /antifraud/whitelists Create whitelisted rule
AntifraudApi deleteRuleBlacklist DELETE /antifraud/blacklists/{id} Delete blacklisted rule
AntifraudApi deleteRuleWhitelist DELETE /antifraud/whitelists/{id} Delete whitelisted rule
AntifraudApi getRuleBlacklist GET /antifraud/blacklists Get list of blacklisted rules
AntifraudApi getRuleWhitelist GET /antifraud/whitelists Get a list of whitelisted rules
ApiKeysApi createApiKey POST /api_keys Create Api Key
ApiKeysApi deleteApiKey DELETE /api_keys/{id} Delete Api Key
ApiKeysApi getApiKey GET /api_keys/{id} Get Api Key
ApiKeysApi getApiKeys GET /api_keys Get list of Api Keys
ApiKeysApi updateApiKey PUT /api_keys/{id} Update Api Key
BalancesApi getBalance GET /balance Get a company's balance
ChargesApi getCharges GET /charges Get A List of Charges
ChargesApi ordersCreateCharge POST /orders/{id}/charges Create charge
ChargesApi ordersCreateCharges POST /orders/{id}/add_charges Create charges
ChargesApi updateCharge PUT /charges/{id} Update a charge
CompaniesApi createCompany POST /companies Create Company
CompaniesApi getCompanies GET /companies Get List of Companies
CompaniesApi getCompany GET /companies/{id} Get Company
CompaniesApi getCompanyDocuments GET /companies/{company_id}/documents Get Company Documents
CompaniesApi getCurrentCompany GET /companies/current Get Current Company
CompaniesApi updateCompanyDocument PATCH /companies/{company_id}/document Update Company Document
CompaniesApi uploadCompanyDocument POST /companies/{company_id}/document Upload Company Document
CustomersApi createCustomer POST /customers Create customer
CustomersApi createCustomerFiscalEntities POST /customers/{id}/fiscal_entities Create Fiscal Entity
CustomersApi deleteCustomerById DELETE /customers/{id} Delete Customer
CustomersApi getCustomerById GET /customers/{id} Get Customer
CustomersApi getCustomers GET /customers Get a list of customers
CustomersApi updateCustomer PUT /customers/{id} Update customer
CustomersApi updateCustomerFiscalEntities PUT /customers/{id}/fiscal_entities/{fiscal_entities_id} Update Fiscal Entity
DiscountsApi ordersCreateDiscountLine POST /orders/{id}/discount_lines Create Discount
DiscountsApi ordersDeleteDiscountLines DELETE /orders/{id}/discount_lines/{discount_lines_id} Delete Discount
DiscountsApi ordersGetDiscountLine GET /orders/{id}/discount_lines/{discount_lines_id} Get Discount
DiscountsApi ordersGetDiscountLines GET /orders/{id}/discount_lines Get a List of Discount
DiscountsApi ordersUpdateDiscountLines PUT /orders/{id}/discount_lines/{discount_lines_id} Update Discount
EventsApi getEvent GET /events/{id} Get Event
EventsApi getEvents GET /events Get list of Events
EventsApi resendEvent POST /events/{event_id}/resend Resend Event
LogsApi getLogById GET /logs/{id} Get Log
LogsApi getLogs GET /logs Get List Of Logs
OrdersApi cancelOrder POST /orders/{id}/cancel Cancel Order
OrdersApi createOrder POST /orders Create order
OrdersApi getOrderById GET /orders/{id} Get Order
OrdersApi getOrders GET /orders Get a list of Orders
OrdersApi orderCancelRefund DELETE /orders/{id}/refunds/{refund_id} Cancel Refund
OrdersApi orderRefund POST /orders/{id}/refunds Refund Order
OrdersApi ordersCreateCapture POST /orders/{id}/capture Capture Order
OrdersApi updateOrder PUT /orders/{id} Update Order
PaymentLinkApi cancelCheckout PUT /checkouts/{id}/cancel Cancel Payment Link
PaymentLinkApi createCheckout POST /checkouts Create Unique Payment Link
PaymentLinkApi emailCheckout POST /checkouts/{id}/email Send an email
PaymentLinkApi getCheckout GET /checkouts/{id} Get a payment link by ID
PaymentLinkApi getCheckouts GET /checkouts Get a list of payment links
PaymentLinkApi smsCheckout POST /checkouts/{id}/sms Send an sms
PaymentMethodsApi createCustomerPaymentMethods POST /customers/{id}/payment_sources Create Payment Method
PaymentMethodsApi deleteCustomerPaymentMethods DELETE /customers/{id}/payment_sources/{payment_method_id} Delete Payment Method
PaymentMethodsApi getCustomerPaymentMethods GET /customers/{id}/payment_sources Get Payment Methods
PaymentMethodsApi updateCustomerPaymentMethods PUT /customers/{id}/payment_sources/{payment_method_id} Update Payment Method
PayoutOrdersApi cancelPayoutOrderById PUT /payout_orders/{id}/cancel Cancel Payout Order
PayoutOrdersApi createPayoutOrder POST /payout_orders Create payout order
PayoutOrdersApi getPayoutOrderById GET /payout_orders/{id} Get Payout Order
PayoutOrdersApi getPayoutOrders GET /payout_orders Get a list of Payout Orders
PlansApi createPlan POST /plans Create Plan
PlansApi deletePlan DELETE /plans/{id} Delete Plan
PlansApi getPlan GET /plans/{id} Get Plan
PlansApi getPlans GET /plans Get A List of Plans
PlansApi updatePlan PUT /plans/{id} Update Plan
ProductsApi ordersCreateProduct POST /orders/{id}/line_items Create Product
ProductsApi ordersDeleteProduct DELETE /orders/{id}/line_items/{line_item_id} Delete Product
ProductsApi ordersUpdateProduct PUT /orders/{id}/line_items/{line_item_id} Update Product
ShippingContactsApi createCustomerShippingContacts POST /customers/{id}/shipping_contacts Create a shipping contacts
ShippingContactsApi deleteCustomerShippingContacts DELETE /customers/{id}/shipping_contacts/{shipping_contacts_id} Delete shipping contacts
ShippingContactsApi updateCustomerShippingContacts PUT /customers/{id}/shipping_contacts/{shipping_contacts_id} Update shipping contacts
ShippingsApi ordersCreateShipping POST /orders/{id}/shipping_lines Create Shipping
ShippingsApi ordersDeleteShipping DELETE /orders/{id}/shipping_lines/{shipping_id} Delete Shipping
ShippingsApi ordersUpdateShipping PUT /orders/{id}/shipping_lines/{shipping_id} Update Shipping
SubscriptionsApi cancelSubscription POST /customers/{id}/subscription/cancel Cancel Subscription [Deprecated]
SubscriptionsApi createSubscription POST /customers/{id}/subscription Create Subscription [Deprecated]
SubscriptionsApi getSubscription GET /customers/{id}/subscription Get Subscription [Deprecated]
SubscriptionsApi getSubscriptionEvents GET /customers/{id}/subscription/events Get Subscription Events [Deprecated]
SubscriptionsApi pauseSubscription POST /customers/{id}/subscription/pause Pause Subscription [Deprecated]
SubscriptionsApi resumeSubscription POST /customers/{id}/subscription/resume Resume Subscription [Deprecated]
SubscriptionsApi subscriptionCancel POST /customers/{customer_id}/subscriptions/{id}/cancel Cancel Subscription
SubscriptionsApi subscriptionCreate POST /customers/{customer_id}/subscriptions Create Subscription
SubscriptionsApi subscriptionEvents GET /customers/{customer_id}/subscriptions/{id}/events Get Subscription Events
SubscriptionsApi subscriptionList GET /customers/{customer_id}/subscriptions List Subscriptions
SubscriptionsApi subscriptionPause POST /customers/{customer_id}/subscriptions/{id}/pause Pause Subscription
SubscriptionsApi subscriptionResume POST /customers/{customer_id}/subscriptions/{id}/resume Resume Subscription
SubscriptionsApi subscriptionUpdate PUT /customers/{customer_id}/subscriptions/{id} Update Subscription
SubscriptionsApi subscriptionsGet GET /customers/{customer_id}/subscriptions/{id} Get Subscription
SubscriptionsApi subscriptionsRetry POST /customers/{customer_id}/subscriptions/{id}/retry Retry Failed Payment
SubscriptionsApi updateSubscription PUT /customers/{id}/subscription Update Subscription [Deprecated]
SubscriptionsCustomerPortalApi createCustomerPortal POST /subscriptions/{subscription_id}/customer_portal Create customer portal
SubscriptionsCustomerPortalApi getCustomerPortal GET /subscriptions/{subscription_id}/customer_portal Get customer portal
TaxesApi ordersCreateTaxes POST /orders/{id}/tax_lines Create Tax
TaxesApi ordersDeleteTaxes DELETE /orders/{id}/tax_lines/{tax_id} Delete Tax
TaxesApi ordersUpdateTaxes PUT /orders/{id}/tax_lines/{tax_id} Update Tax
TokensApi createToken POST /tokens Create Token
TransactionsApi getTransaction GET /transactions/{id} Get transaction
TransactionsApi getTransactions GET /transactions Get List transactions
TransfersApi getTransfer GET /transfers/{id} Get Transfer
TransfersApi getTransfers GET /transfers Get a list of transfers
WebhookKeysApi createWebhookKey POST /webhook_keys Create Webhook Key
WebhookKeysApi deleteWebhookKey DELETE /webhook_keys/{id} Delete Webhook key
WebhookKeysApi getWebhookKey GET /webhook_keys/{id} Get Webhook Key
WebhookKeysApi getWebhookKeys GET /webhook_keys Get List of Webhook Keys
WebhookKeysApi updateWebhookKey PUT /webhook_keys/{id} Update Webhook Key
WebhooksApi createWebhook POST /webhooks Create Webhook
WebhooksApi deleteWebhook DELETE /webhooks/{id} Delete Webhook
WebhooksApi getWebhook GET /webhooks/{id} Get Webhook
WebhooksApi getWebhooks GET /webhooks Get List of Webhooks
WebhooksApi testWebhook POST /webhooks/{id}/test Test Webhook
WebhooksApi updateWebhook PUT /webhooks/{id} Update Webhook

Models

Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

engineering@conekta.com

About this package

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

  • API version: 2.3.0
    • Package version: 9.0.0
    • Generator version: 7.23.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

conekta/conekta-php 适用场景与选型建议

conekta/conekta-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.07M 次下载、GitHub Stars 达 91, 最近一次更新时间为 2013 年 12 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「conekta」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 conekta/conekta-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 conekta/conekta-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 conekta/conekta-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.07M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 92
  • 点击次数: 18
  • 依赖项目数: 21
  • 推荐数: 1

GitHub 信息

  • Stars: 91
  • Watchers: 19
  • Forks: 40
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-12-13