yigitbayol / nomuvel
该包的最新版本(dev-main)没有提供许可证信息。
Nomuvel Laravel 库
dev-main
2024-09-14 09:11 UTC
Requires
- guzzlehttp/guzzle: ^7.9
This package is not auto-updated.
Last update: 2024-09-22 05:06:01 UTC
README
Nomuvel 是一个与 Nomupay API 集成的 Laravel 包装器。该包通过一个简单易用的 Laravel 接口,让您轻松实现 Nomupay API 中的各种操作。
特性
- 与 E-Money API 集成
- Individual Onboarding API 集成
安装
-
将包添加到项目中
composer require yigitbayol/nomuvel
-
发布配置文件
php artisan vendor:publish --tag=nomuvel-config
-
将必要的 API 信息添加到 .env 文件中
NOMUVEL_ENV=dev NOMUVEL_TEST_URL=https://api-dev.nomupay.com.tr NOMUVEL_PRODUCTION_URL=https://api.nomuvel.com.tr NOMUVEL_USER_CODE=123456 NOMUVEL_PIN=6A262E9E910364A9D7D0 NOMUVEL_CHANNEL=MYAPP
使用方法
E-Money API 示例
E-Money 账户创建
use Yigitbayol\Nomuvel\Services\Nomuvel; /** * Yeni bir E-Money hesabı oluşturun * * @param string $tckn "11111111111" * @param string $iban "TR1312312321312312" * @param string $successUrl "https://nomupay.com.tr/success" * @param string $errorUrl "https://nomupay.com.tr/fail" * @return array * @throws ConnectionException */ $nomuvel = new Nomuvel(); $response = $nomuvel->emoney->createAccount("11111111111", "TR1312312321312312", "https://nomupay.com.tr/success", "https://nomupay.com.tr/fail"); if ($response['error']) { // Hata yönetimi echo $response['message']; } else { // Başarılı yanıt yönetimi print_r($response); }
向 IBAN 发送资金
use Yigitbayol\Nomuvel\Services\Nomuvel; /** * IBAN'a para gönderin * * @param string $senderClientId "34a4cae28-622d-48b3-86b7-1a3cde436d31" * @param string $senderAccountId "85a4cde28-622d-48b3-1a3cde436d31" * @param string $receiverIBAN "TR1111111111111111" * @param string $receiverTcknVkn "12345678910" * @param int $amount "1 TL için 100" * @param string $partnerReference "3e4cae28-622d-48b3-86b7-1a3cde436d31" * @param string|null $description "Test" * @return array * @throws ConnectionException */ $nomuvel = new Nomuvel(); $response = $nomuvel->emoney->sendToExternalIBAN("34a4cae28-622d-48b3-86b7-1a3cde436d31", "85a4cde28-622d-48b3-1a3cde436d31", "TR1111111111111111", "12345678910", 100, "3e4cae28-622d-48b3-86b7-1a3cde436d31", "Test"); if ($response['error']) { // Hata yönetimi echo $response['message']; } else { // Başarılı yanıt yönetimi print_r($response); }
P2P 资金转移
use Yigitbayol\Nomuvel\Services\Nomuvel; /** * P2P para gönderin * * @param string $senderAccountId "85a4cde28-622d-48b3-1a3cde436d31" * @param string $receiverAccountId "3e4cae28-622d-48b3-86b7-1a3cde436d31" * @param int $amount "1 TL için 100 girilmelidir" * @param string $referenceId "3e4cae28-622d-48b3-86b7-1a3cde436d31" * @param int $partnerId 0 * @param string|null $description "Test" * @return array * @throws ConnectionException */ $nomuvel = new Nomuvel(); $response = $nomuvel->emoney->P2PSend("85a4cde28-622d-48b3-1a3cde436d31", "3e4cae28-622d-48b3-86b7-1a3cde436d31", 100, "3e4cae28-622d-48b3-86b7-1a3cde436d31", 0, "Test"); if ($response['error']) { // Hata yönetimi echo $response['message']; } else { // Başarılı yanıt yönetimi print_r($response); }
取款
use Yigitbayol\Nomuvel\Services\Nomuvel; /** * E-Money hesabından para çekin * * @param string $accountId "85a4cde28-622d-48b3-1a3cde436d31" * @param int $amount "1 TL için 100 değeri girilmeli" * @param string $transferChannel "Ozan,Papara vb.." * @param string $referenceId "3e4cae28-622d-48b3-86b7-1a3cde436d31" * @param string $transferType "INSTANT veya GROUP" * @param string|null $transferDate "Sadece INSTANT için zorunludur. 2024-08-14T09:45:02.289Z" * @param string|null $description "Test" * @return array * @throws ConnectionException */ $nomuvel = new Nomuvel(); $response = $nomuvel->emoney->withdrawal("85a4cde28-622d-48b3-1a3cde436d31", 100, "Ozan", "3e4cae28-622d-48b3-86b7-1a3cde436d31", "INSTANT", "2024-08-14T09:45:02.289Z", "Test"); if ($response['error']) { // Hata yönetimi echo $response['message']; } else { // Başarılı yanıt yönetimi print_r($response); }
API 文档
Nomuvel 支持以下 API 端点
E-Money API
- CreateAccountWithTckn
- SendToExternalIBAN
- P2PSend
- Withdrawal
Individual Onboarding API
- Create
- Validate Otp Token
- Get By Tckn
- Query By Tckn
- Add To E-Money
有关更多信息,请参阅 E-Money API 文档和 Individual Onboarding API 文档页面。
许可证 此项目使用 MIT 许可证。有关更多信息,请参阅 LICENSE 文件。