hashstudio / fintech-market-sdk
金融市场 API 描述
dev-main
2024-08-30 10:13 UTC
Requires
- php: ^8.1
- illuminate/support: ^9.0|^10.0|^11.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-08-30 10:13:07 UTC
README
fintech-market.com Laravel API SDK。目前此包只支持 pushInquiry 方法。
要求
- PHP >= 8.1
- Laravel >= 9.0
安装
您可以通过 composer 安装此包
composer require hashstudio/fintech-market-sdk
使用方法
发布配置并设置 API 密钥
php artisan vendor:publish --tag=fintech-market-config
use Hashstudio\FintechMarketSdk\FintechMarketSdk; $sdk = app(FintechMarketSdk::class); $data = [ 'data' => [ 'person_external_id' => 'f3529593-e832', 'entity_external_id' => 'f3529593-e832-40e9-bf1d-45272d8ffffsdfsd', 'lock_version' => 5, 'fields' => [ 'aml_factor' => 'true', 'collateral_insurance' => '1', 'collateral_types' => '1', 'collateral_value_volatility' => '1', 'data_reliability' => '1', 'enforceability_of_collateral' => '1', 'feasibility_of_collateral' => '1', 'fin_borrowings' => '0', 'fin_collateral_value' => '0', 'fin_credit_history' => 'true', 'fin_current_assets' => '1000', 'fin_current_liabilities' => '1000', 'fin_loan_amount' => '0', 'fin_personal_income' => '9000', 'fin_profit' => '5000', 'fin_revenue' => '1000', 'fin_total_assets' => '1000', 'fin_total_liabilities' => '5000', 'non_fin_experience' => '13', 'non_fin_term_length' => '11', 'reputation' => '1', 'sustainability' => '1', 'ultimate_beneficiary' => '1', ], ], ]; $branch = 'some_branch'; $scenarioKey = 'short_test'; $sdk->pushInquiry($branch, $scenarioKey, $data);
测试
composer test