承接 ramomen/laravel-yapikredi-pos 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ramomen/laravel-yapikredi-pos

Composer 安装命令:

composer require ramomen/laravel-yapikredi-pos

包简介

Laravel Yapı Kredi POS

README 文档

README

YapiKrediPosLaravel is a library that enables the integration of Yapı Kredi Posnet into Laravel projects.

This library utilizes the Yapı Kredi Posnet API to perform payment transactions.

Installation

  1. Install the library into your Laravel project using composer:
    composer require ramomen/laravel-yapikredi-pos

After the library is installed, you need to configure the following settings in your .env file:

YAPIKREDI_MERCHANT_ID=000000000000000
YAPIKREDI_TERMINAL_ID=00000000
YAPIKREDI_MODE=test

Note: The YAPIKREDI_MODE setting can be set to either test or production. In the test mode, transactions will be performed in the test environment, while in the production mode, transactions will be performed in the live environment.

In the integration area, you can use the YapiKredi class. Here is an example usage:

use Ramomen\YapikrediPosLaravel\YapiKredi;


// Create an instance of YapiKredi and pass the Posnet instance as a parameter
$yapiKredi = new YapiKredi();

// Perform a sale transaction
$result = $yapiKredi->doSale(
    '1234567890123456', // Card number
    '1221', // Expiry date
    '123', // CVC
    'ABC123', // Order ID
    '100', // Amount
    'YT' // Currency
);

// Handle the result of the transaction
if ($result->status) {
    echo 'Transaction successful!' . PHP_EOL;
    echo 'Approval code: ' . $result->approvedCode . PHP_EOL;
    echo 'Activation code: ' . $result->activationCode . PHP_EOL;
    echo 'Mode: ' . $result->mode . PHP_EOL;
} else {
    echo 'Transaction failed!' . PHP_EOL;
    echo 'Error code: ' . $result->errorCode . PHP_EOL;
    echo 'Error message: ' . $result->posnetResponse . PHP_EOL;
    // You can access additional error details using $result->merchantInfo and $result->posnetResponseXMLData
}

Please note that the example above is just a demonstration, and you may need to adapt it to fit your specific integration requirements.

You can refer to the YapıKredi Posnet Documentation for error codes and more detailed information. This package is not official and does not have any affiliation with Yapı Kredi or Posnet. The names Yapı Kredi and Posnet are owned by Yapı ve Kredi Bankası A.Ş. All rights reserved.

Feel free to customize the README file as per your project's needs and provide additional information about the library, usage instructions, and any other relevant details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-27