muhammad-umar/ppp-stripe 问题修复 & 功能扩展

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

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

muhammad-umar/ppp-stripe

最新稳定版本:v1.0.0

Composer 安装命令:

composer require muhammad-umar/ppp-stripe

包简介

Purchasing Power Parity (PPP) fair pricing adjustment by countries with Stripe (or any other payment gateway supported by Laravel Cashier) integration powered by data from the World Bank

README 文档

README

"Buy Me A Coffee"

Detailed article is availabe at https://docs.agenytics.com/blog/ppp-stripe

Implementing Purchasing Power Parity (PPP) pricing per country for a Stripe Checkout purchase flow. But you can use it for any other payment gateway, like PayPal, Paddle, Lemon Squeezy, etc. This package uses World Bank PPP data and TrustIP to detect VPN/Proxy.

Installation in Existing Laravel Project

  1. Install the package

    composer require muhammad-umar/ppp-gateway
  2. Publish the assets

    # PPP Data CSV
    php artisan vendor:publish --tag="ppp-gateway-data"

    Optional: You can also publish the config and migrations files:

    php artisan vendor:publish --tag="ppp-gateway-config"
    php artisan vendor:publish --tag="ppp-gateway-migrations"
  3. Run migrations

    php artisan migrate
  4. Import PPP data

    php artisan import:ppp

We have used lifetime product for demonstration purposes. You can use any other product you want.

  1. Configure environment variables

    STRIPE_LIFETIME_PRODUCT_ID=prod_xxxxx
    TRUSTIP_API_KEY=your_trustip_api_key
  2. Configure subscription plans

We have subscription-plans.php config file for payment products. You can configure it as you want. You should use this data to show price in frontend, sending PPPService->getAdjustedPriceData() parameter from your Controller.

  1. Checkout page

From fronted you should send a POST request to /purchase route (see PPPGatewayServiceProvider.php for route registration). It is binded to PurchaseController that will create a checkout session with adjusted price for the selected country.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固