miladxandi/intellectmoney-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

miladxandi/intellectmoney-sdk

最新稳定版本:0.0.3.2

Composer 安装命令:

composer require miladxandi/intellectmoney-sdk

包简介

Intellectmoney PHP SDK

README 文档

README

Generate a secretKey:

  1. Go here: https://lk.intellectmoney.ru/profile/security/api and generate credentials and set all of them in your code by \Intellectmoney\Configurations:: static propertes.
  2. Then go here and select your shop for change: https://lk.intellectmoney.ru/eshops
  3. Now put the secretKey in the "Connecting the store" tab, in its related input field.

Do Pay

try{
    \Intellectmoney\Configurations::$eshopId = 111111;
    \Intellectmoney\Configurations::$secretKey = "111111";
    $gateway = new \Intellectmoney\Merchant\Payment();
    
    
    $url = "https://www.example.com/";
    $email = "info@example.com";
    $orderId = 145; //Random number or string generated by your internal system
    $amount = 2000;
    
    $invoiceId = $gateway->createInvoice(
        $orderId,
        $amount,
        $email,
        resultUrl: $url,
    )->Result->InvoiceId;

    if ($invoiceId!=null){
        $paymentLink = $gateway->pay($invoiceId)->Result->PaymentLink;
        header("Location: ".$paymentLink);
    }
} catch (\GuzzleHttp\Exception\GuzzleException $e) {
    var_dump($e->getMessage());
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-05