承接 sohagsrz/nowpayments-php-sdk 相关项目开发

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

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

sohagsrz/nowpayments-php-sdk

Composer 安装命令:

composer require sohagsrz/nowpayments-php-sdk

包简介

A professional, OOP-compliant PHP SDK for the NowPayments.io API.

README 文档

README

A professional, standalone, and OOP-compliant PHP library for integrating with the NowPayments.io API.

Features

  • Supports all main methods: Invoices, Payments, Estimates, Currencies, and Status.
  • Environment Aware: Seamlessly switch between Sandbox and Production.
  • Secure Webhooks: Built-in IPN signature verification.
  • Exception Handling: Custom exceptions with raw API error detail.
  • Standalone: Perfect for any PHP project or framework.

Installation

composer require sohagsrz/nowpayments-php-sdk

Basic Usage

use NowPayments\NowPayments;

$sdk = new NowPayments('YOUR-API-KEY', true); // true for Sandbox

// Get API Status
$status = $sdk->getStatus();

// Create a professional crypto invoice
$invoice = $sdk->createInvoice([
    'price_amount' => 10.00,
    'price_currency' => 'usd',
    'order_id' => '12345',
    'order_description' => 'Premium Upgrade',
    'success_url' => 'https://yoursite.com/success',
    'ipn_callback_url' => 'https://yoursite.com/webhook'
]);

// Redirect user to payment
header('Location: ' . $invoice['invoice_url']);

Webhook Verification

$receivedSig = $_SERVER['HTTP_X_NOWPAYMENTS_SIG'];
$payload = json_decode(file_get_contents('php://input'), true);

$sdk = new NowPayments('API-KEY', false, 'YOUR-IPN-SECRET');
if ($sdk->verifyIPNSignature($payload, $receivedSig)) {
    // Payment is authentic!
}

Requirements

  • PHP >= 7.4
  • GuzzleHTTP ^7.0

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固