定制 digitalfemsa/femsa-php 二次开发

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

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

digitalfemsa/femsa-php

最新稳定版本:1.0.5

Composer 安装命令:

composer require digitalfemsa/femsa-php

包简介

DigitalFemsa PHP Library

README 文档

README

Femsa sdk

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

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

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

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

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php require_once('/path/to/digitalfemsa/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 = DigitalFemsa\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new DigitalFemsa\Api\ApiKeysApi( // 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 ); $api_key_request = new \DigitalFemsa\Model\ApiKeyRequest(); // \DigitalFemsa\Model\ApiKeyRequest | requested field for a api keys $accept_language = es; // string | Use for knowing which language to use $x_child_company_id = 6441b6376b60c3a638da80af; // string | In the case of a holding company, the company id of the child company to which will process the request. try { $result = $apiInstance->createApiKey($api_key_request, $accept_language, $x_child_company_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling ApiKeysApi->createApiKey: ', $e->getMessage(), PHP_EOL; }

API Endpoints

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

Class Method HTTP request Description
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 updateCharge PUT /charges/{id} Update a charge
CompaniesApi getCompanies GET /companies Get List of Companies
CompaniesApi getCompany GET /companies/{id} Get Company
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}/webhook_logs/{webhook_log_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
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
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
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@femsa.com

About this package

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

  • API version: 2.1.0
    • Package version: 1.0.5
    • Generator version: 7.5.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

统计信息

  • 总下载量: 28.02k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固