Compare commits

..

No commits in common. "6.x" and "v6.3.0" have entirely different histories.
6.x ... v6.3.0

13 changed files with 454 additions and 788 deletions

View File

@ -5,8 +5,6 @@ updates:
directory: /
schedule:
interval: daily
cooldown:
default-days: 7
open-pull-requests-limit: 5
reviewers:
- BitcoinMitchell
@ -18,8 +16,6 @@ updates:
directory: /modules/btcpay
schedule:
interval: daily
cooldown:
default-days: 7
open-pull-requests-limit: 5
reviewers:
- BitcoinMitchell
@ -31,8 +27,6 @@ updates:
directory: "/.github/workflows"
schedule:
interval: daily
cooldown:
default-days: 7
open-pull-requests-limit: 5
reviewers:
- BitcoinMitchell

View File

@ -4,19 +4,15 @@ on:
push:
tags: [ 'v*' ] # Push events to matching v*, i.e. v1.0, v20.15.10
permissions: {}
jobs:
linting:
name: "Release a new ZIP"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@c2d88d3ecc89a9ef08eebf45d9637801dcee7eb5" # v6.0.0
with:
persist-credentials: false
uses: "actions/checkout@v4"
- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1" # v2.36.0
uses: "shivammathur/setup-php@v2" # https://github.com/shivammathur/setup-php
with:
php-version: "8.0"
extensions: "mbstring, xml, ctype, iconv, intl, gd"
@ -25,12 +21,11 @@ jobs:
id: "composer-cache"
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
- name: "Cache composer dependencies"
uses: "actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb" # v5.0.1
uses: "actions/cache@v4"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "${{ runner.os }}-composer-"
lookup-only: true
- name: "Validate composer"
run: "composer validate"
- name: "Install Composer dependencies"
@ -43,7 +38,7 @@ jobs:
# Make a release from the tag and upload the zip
- name: "Create Release"
id: "create_release"
uses: "softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b" # v2.5.0
uses: "softprops/action-gh-release@v2"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:

View File

@ -1,26 +0,0 @@
name: GitHub Actions Security Analysis with zizmor 🌈
on:
push:
branches: ["main"]
pull_request:
branches: ["**"]
permissions: {}
jobs:
zizmor:
name: Run zizmor 🌈
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read # only needed for private repos
actions: read # only needed for private repos
steps:
- name: Checkout repository
uses: actions/checkout@c2d88d3ecc89a9ef08eebf45d9637801dcee7eb5 # v6.0.0
with:
persist-credentials: false
- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0

View File

@ -1,14 +1,6 @@
name: "Validate"
on:
push:
paths: [ 'modules/**' ]
branches: [ '6.x' ]
tags: [ 'v*' ]
pull_request:
paths: [ 'modules/**' ]
permissions: {}
on: [ "pull_request" ]
jobs:
linting:
@ -19,11 +11,9 @@ jobs:
php-versions: [ '8.0', '8.1' ]
steps:
- name: "Checkout"
uses: "actions/checkout@c2d88d3ecc89a9ef08eebf45d9637801dcee7eb5" # v6.0.0
with:
persist-credentials: false
uses: "actions/checkout@v4"
- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1" # v2.36.0
uses: "shivammathur/setup-php@v2" # https://github.com/shivammathur/setup-php
with:
php-version: "${{ matrix.php-versions }}"
extensions: "mbstring, xml, ctype, iconv, intl, gd"
@ -32,12 +22,11 @@ jobs:
id: "composer-cache"
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
- name: "Cache composer dependencies"
uses: "actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb" # v5.0.1
uses: "actions/cache@v4"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: "${{ runner.os }}-composer-"
lookup-only: true
- name: "Validate composer"
run: "composer validate"
- name: "Install Composer dependencies"

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2017-2025 btcpayserver
Copyright (c) 2017-2024 btcpayserver
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -8,7 +8,7 @@
<div align="center">
<p>
<a href="https://github.com/btcpayserver/prestashop-plugin/pulse"><img src="https://img.shields.io/maintenance/yes/2025?style=flat-square" alt="Maintained"/></a>
<a href="https://github.com/btcpayserver/prestashop-plugin/pulse"><img src="https://img.shields.io/maintenance/yes/2024?style=flat-square" alt="Maintained"/></a>
<a href="https://github.com/btcpayserver/prestashop-plugin/actions"><img src="https://img.shields.io/github/actions/workflow/status/btcpayserver/prestashop-plugin/validate.yml?style=flat-square" alt="GitHub Workflow Status"/></a>
<a href="https://github.com/btcpayserver/prestashop-plugin/blob/6.x/LICENSE"><img src="https://img.shields.io/github/license/btcpayserver/prestashop-plugin?color=brightgreen&amp;style=flat-square" alt="GitHub License"/></a>
<a href="https://github.com/btcpayserver/prestashop-plugin#contributing"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs are welcome"/></a>
@ -41,7 +41,7 @@
Please ensure that you meet the following requirements before installing this plugin.
- You are using PHP 8.0 or higher
- Your PrestaShop is version 8.0/9.0 or higher.
- Your PrestaShop is version 8.0 or higher.
- Your BTCPay Server is version 1.7.0 or higher
- The PDO, curl, gd, intl, json, and mbstring PHP extensions are available
- You have a BTCPay Server, either [self-hosted](https://docs.btcpayserver.org/Deployment/) or [hosted by a third party](https://docs.btcpayserver.org/Deployment/ThirdPartyHosting/)
@ -50,9 +50,9 @@ Please ensure that you meet the following requirements before installing this pl
- [You've a wallet connected to your store](https://docs.btcpayserver.org/WalletSetup)
### Tested successfully
- Prestashop v8.0, v8.0.1, v8.0.4, v8.1.0, v8.1.3, v8.1.4, v8.2.1, v9.0.0
- BTCPay server v1.7.0, v1.7.3.0, v1.12.5, v1.13.0, v1.13.5, v2.1.5, v2.2.1
- BTCPay server v2 is supported as of module version v6.3.0.
- Prestashop v8.0, v8.0.1, v8.0.4, v8.1.0, v8.1.3 and v8.1.4
- BTCPay server v1.7.0, v1.7.3.0, v1.12.5, v1.13.0 and v1.13.5
- BTCPay server v2 should be supported as of module version v6.3.0.
### Multistore

697
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -52,7 +52,7 @@ class BTCPay extends PaymentModule
{
$this->name = 'btcpay';
$this->tab = 'payments_gateways';
$this->version = '6.3.1';
$this->version = '6.3.0';
$this->author = 'BTCPay Server';
$this->ps_versions_compliancy = ['min' => Constants::MINIMUM_PS_VERSION, 'max' => _PS_VERSION_];
$this->controllers = ['payment', 'validation', 'webhook'];
@ -240,12 +240,8 @@ class BTCPay extends PaymentModule
try {
// Get the invoice and its payments
$invoice = $client->invoice()->getInvoice($storeID, $invoiceId);
// Filter out methods without payments
$paymentMethods = array_filter($client->invoice()->getPaymentMethods($storeID, $invoiceId), static function ($method) {
return !empty($method->getPayments());
});
$invoice = $client->invoice()->getInvoice($storeID, $invoiceId);
$paymentMethods = $client->invoice()->getPaymentMethods($storeID, $invoiceId);
// Has any payment been received
$paymentReceived = array_reduce($paymentMethods, static function ($carry, $method) {

View File

@ -62,16 +62,16 @@
},
{
"name": "composer/semver",
"version": "3.4.4",
"version": "3.4.3",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95"
"reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95",
"reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95",
"url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
"reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
"shasum": ""
},
"require": {
@ -123,7 +123,7 @@
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.4.4"
"source": "https://github.com/composer/semver/tree/3.4.3"
},
"funding": [
{
@ -133,22 +133,26 @@
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2025-08-20T19:15:30+00:00"
"time": "2024-09-19T14:15:21+00:00"
},
{
"name": "stechstudio/backoff",
"version": "1.6",
"version": "1.4",
"source": {
"type": "git",
"url": "https://github.com/stechstudio/backoff.git",
"reference": "baab60fdce9dc8ab63a17b28e636b991785ab027"
"reference": "cfbc47e8925652a0cd6f5b419f665081c8796ca6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stechstudio/backoff/zipball/baab60fdce9dc8ab63a17b28e636b991785ab027",
"reference": "baab60fdce9dc8ab63a17b28e636b991785ab027",
"url": "https://api.github.com/repos/stechstudio/backoff/zipball/cfbc47e8925652a0cd6f5b419f665081c8796ca6",
"reference": "cfbc47e8925652a0cd6f5b419f665081c8796ca6",
"shasum": ""
},
"require-dev": {
@ -176,64 +180,57 @@
"description": "PHP library providing retry functionality with multiple backoff strategies and jitter support",
"support": {
"issues": "https://github.com/stechstudio/backoff/issues",
"source": "https://github.com/stechstudio/backoff/tree/1.6"
"source": "https://github.com/stechstudio/backoff/tree/1.4"
},
"time": "2025-04-08T13:44:27+00:00"
"time": "2024-08-29T21:43:13+00:00"
}
],
"packages-dev": [
{
"name": "ergebnis/composer-normalize",
"version": "2.48.2",
"version": "2.44.0",
"source": {
"type": "git",
"url": "https://github.com/ergebnis/composer-normalize.git",
"reference": "86dc9731b8320f49e9be9ad6d8e4de9b8b0e9b8b"
"reference": "bd0c446426bb837ae0cc9f97948167e658bd11d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/86dc9731b8320f49e9be9ad6d8e4de9b8b0e9b8b",
"reference": "86dc9731b8320f49e9be9ad6d8e4de9b8b0e9b8b",
"url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/bd0c446426bb837ae0cc9f97948167e658bd11d2",
"reference": "bd0c446426bb837ae0cc9f97948167e658bd11d2",
"shasum": ""
},
"require": {
"composer-plugin-api": "^2.0.0",
"ergebnis/json": "^1.4.0",
"ergebnis/json-normalizer": "^4.9.0",
"ergebnis/json-printer": "^3.7.0",
"ergebnis/json": "^1.2.0",
"ergebnis/json-normalizer": "^4.5.0",
"ergebnis/json-printer": "^3.5.0",
"ext-json": "*",
"justinrainbow/json-schema": "^5.2.12 || ^6.0.0",
"localheinz/diff": "^1.3.0",
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
"justinrainbow/json-schema": "^5.2.12",
"localheinz/diff": "^1.1.1",
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
},
"require-dev": {
"composer/composer": "^2.8.3",
"ergebnis/license": "^2.7.0",
"ergebnis/php-cs-fixer-config": "^6.53.0",
"ergebnis/phpstan-rules": "^2.11.0",
"ergebnis/phpunit-slow-test-detector": "^2.20.0",
"fakerphp/faker": "^1.24.1",
"composer/composer": "^2.7.7",
"ergebnis/license": "^2.5.0",
"ergebnis/php-cs-fixer-config": "^6.37.0",
"ergebnis/phpunit-slow-test-detector": "^2.16.0",
"fakerphp/faker": "^1.23.1",
"infection/infection": "~0.26.6",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan": "^2.1.17",
"phpstan/phpstan-deprecation-rules": "^2.0.3",
"phpstan/phpstan-phpunit": "^2.0.7",
"phpstan/phpstan-strict-rules": "^2.0.6",
"phpunit/phpunit": "^9.6.20",
"rector/rector": "^2.1.4",
"symfony/filesystem": "^5.4.41"
"psalm/plugin-phpunit": "~0.19.0",
"rector/rector": "^1.2.5",
"symfony/filesystem": "^5.4.41",
"vimeo/psalm": "^5.26.1"
},
"type": "composer-plugin",
"extra": {
"class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin",
"branch-alias": {
"dev-main": "2.49-dev"
},
"plugin-optional": true,
"composer-normalize": {
"indent-size": 2,
"indent-style": "space"
}
},
"plugin-optional": true
},
"autoload": {
"psr-4": {
@ -264,48 +261,43 @@
"security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md",
"source": "https://github.com/ergebnis/composer-normalize"
},
"time": "2025-09-06T11:42:34+00:00"
"time": "2024-09-30T21:56:22+00:00"
},
{
"name": "ergebnis/json",
"version": "1.6.0",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/ergebnis/json.git",
"reference": "7b56d2b5d9e897e75b43e2e753075a0904c921b1"
"reference": "7656ac2aa6c2ca4408f96f599e9a17a22c464f69"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ergebnis/json/zipball/7b56d2b5d9e897e75b43e2e753075a0904c921b1",
"reference": "7b56d2b5d9e897e75b43e2e753075a0904c921b1",
"url": "https://api.github.com/repos/ergebnis/json/zipball/7656ac2aa6c2ca4408f96f599e9a17a22c464f69",
"reference": "7656ac2aa6c2ca4408f96f599e9a17a22c464f69",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.44.0",
"ergebnis/data-provider": "^3.3.0",
"ergebnis/license": "^2.5.0",
"ergebnis/php-cs-fixer-config": "^6.37.0",
"ergebnis/phpstan-rules": "^2.11.0",
"ergebnis/phpunit-slow-test-detector": "^2.16.1",
"fakerphp/faker": "^1.24.0",
"infection/infection": "~0.26.6",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan": "^2.1.22",
"phpstan/phpstan-deprecation-rules": "^2.0.3",
"phpstan/phpstan-phpunit": "^2.0.7",
"phpstan/phpstan-strict-rules": "^2.0.6",
"phpunit/phpunit": "^9.6.24",
"rector/rector": "^2.1.4"
"phpstan/phpstan": "^1.12.10",
"phpstan/phpstan-deprecation-rules": "^1.2.1",
"phpstan/phpstan-phpunit": "^1.4.0",
"phpstan/phpstan-strict-rules": "^1.6.1",
"phpunit/phpunit": "^9.6.18",
"rector/rector": "^1.2.10"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.7-dev"
},
"composer-normalize": {
"indent-size": 2,
"indent-style": "space"
@ -337,20 +329,20 @@
"security": "https://github.com/ergebnis/json/blob/main/.github/SECURITY.md",
"source": "https://github.com/ergebnis/json"
},
"time": "2025-09-06T09:08:45+00:00"
"time": "2024-11-17T11:51:22+00:00"
},
{
"name": "ergebnis/json-normalizer",
"version": "4.10.1",
"version": "4.7.0",
"source": {
"type": "git",
"url": "https://github.com/ergebnis/json-normalizer.git",
"reference": "77961faf2c651c3f05977b53c6c68e8434febf62"
"reference": "36d86389095736944a5954ec440552bbe92e425f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/77961faf2c651c3f05977b53c6c68e8434febf62",
"reference": "77961faf2c651c3f05977b53c6c68e8434febf62",
"url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/36d86389095736944a5954ec440552bbe92e425f",
"reference": "36d86389095736944a5954ec440552bbe92e425f",
"shasum": ""
},
"require": {
@ -359,8 +351,8 @@
"ergebnis/json-printer": "^3.5.0",
"ergebnis/json-schema-validator": "^4.2.0",
"ext-json": "*",
"justinrainbow/json-schema": "^5.2.12 || ^6.0.0",
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
"justinrainbow/json-schema": "^5.2.12",
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
},
"require-dev": {
"composer/semver": "^3.4.3",
@ -385,7 +377,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "4.11-dev"
"dev-main": "4.7-dev"
},
"composer-normalize": {
"indent-size": 2,
@ -419,24 +411,24 @@
"security": "https://github.com/ergebnis/json-normalizer/blob/main/.github/SECURITY.md",
"source": "https://github.com/ergebnis/json-normalizer"
},
"time": "2025-09-06T09:18:13+00:00"
"time": "2024-11-17T20:34:42+00:00"
},
{
"name": "ergebnis/json-pointer",
"version": "3.7.1",
"version": "3.6.0",
"source": {
"type": "git",
"url": "https://github.com/ergebnis/json-pointer.git",
"reference": "43bef355184e9542635e35dd2705910a3df4c236"
"reference": "4fc85d8edb74466d282119d8d9541ec7cffc0798"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/43bef355184e9542635e35dd2705910a3df4c236",
"reference": "43bef355184e9542635e35dd2705910a3df4c236",
"url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/4fc85d8edb74466d282119d8d9541ec7cffc0798",
"reference": "4fc85d8edb74466d282119d8d9541ec7cffc0798",
"shasum": ""
},
"require": {
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.43.0",
@ -457,7 +449,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.8-dev"
"dev-main": "3.6-dev"
},
"composer-normalize": {
"indent-size": 2,
@ -492,29 +484,28 @@
"security": "https://github.com/ergebnis/json-pointer/blob/main/.github/SECURITY.md",
"source": "https://github.com/ergebnis/json-pointer"
},
"time": "2025-09-06T09:28:19+00:00"
"time": "2024-11-17T12:37:06+00:00"
},
{
"name": "ergebnis/json-printer",
"version": "3.8.1",
"version": "3.7.0",
"source": {
"type": "git",
"url": "https://github.com/ergebnis/json-printer.git",
"reference": "211d73fc7ec6daf98568ee6ed6e6d133dee8503e"
"reference": "ced41fce7854152f0e8f38793c2ffe59513cdd82"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ergebnis/json-printer/zipball/211d73fc7ec6daf98568ee6ed6e6d133dee8503e",
"reference": "211d73fc7ec6daf98568ee6ed6e6d133dee8503e",
"url": "https://api.github.com/repos/ergebnis/json-printer/zipball/ced41fce7854152f0e8f38793c2ffe59513cdd82",
"reference": "ced41fce7854152f0e8f38793c2ffe59513cdd82",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.44.0",
"ergebnis/data-provider": "^3.3.0",
"ergebnis/license": "^2.5.0",
"ergebnis/php-cs-fixer-config": "^6.37.0",
@ -530,15 +521,6 @@
"rector/rector": "^1.2.10"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.9-dev"
},
"composer-normalize": {
"indent-size": 2,
"indent-style": "space"
}
},
"autoload": {
"psr-4": {
"Ergebnis\\Json\\Printer\\": "src/"
@ -567,20 +549,20 @@
"security": "https://github.com/ergebnis/json-printer/blob/main/.github/SECURITY.md",
"source": "https://github.com/ergebnis/json-printer"
},
"time": "2025-09-06T09:59:26+00:00"
"time": "2024-11-17T11:20:51+00:00"
},
{
"name": "ergebnis/json-schema-validator",
"version": "4.5.1",
"version": "4.4.0",
"source": {
"type": "git",
"url": "https://github.com/ergebnis/json-schema-validator.git",
"reference": "b739527a480a9e3651360ad351ea77e7e9019df2"
"reference": "85f90c81f718aebba1d738800af83eeb447dc7ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/b739527a480a9e3651360ad351ea77e7e9019df2",
"reference": "b739527a480a9e3651360ad351ea77e7e9019df2",
"url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/85f90c81f718aebba1d738800af83eeb447dc7ec",
"reference": "85f90c81f718aebba1d738800af83eeb447dc7ec",
"shasum": ""
},
"require": {
@ -588,7 +570,7 @@
"ergebnis/json-pointer": "^3.4.0",
"ext-json": "*",
"justinrainbow/json-schema": "^5.2.12 || ^6.0.0",
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.44.0",
@ -609,7 +591,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "4.6-dev"
"dev-main": "4.4-dev"
},
"composer-normalize": {
"indent-size": 2,
@ -644,44 +626,34 @@
"security": "https://github.com/ergebnis/json-schema-validator/blob/main/.github/SECURITY.md",
"source": "https://github.com/ergebnis/json-schema-validator"
},
"time": "2025-09-06T11:37:35+00:00"
"time": "2024-11-18T06:32:28+00:00"
},
{
"name": "justinrainbow/json-schema",
"version": "6.6.1",
"version": "5.3.0",
"source": {
"type": "git",
"url": "https://github.com/jsonrainbow/json-schema.git",
"reference": "fd8e5c6b1badb998844ad34ce0abcd71a0aeb396"
"reference": "feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/fd8e5c6b1badb998844ad34ce0abcd71a0aeb396",
"reference": "fd8e5c6b1badb998844ad34ce0abcd71a0aeb396",
"url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8",
"reference": "feb2ca6dd1cebdaf1ed60a4c8de2e53ce11c4fd8",
"shasum": ""
},
"require": {
"ext-json": "*",
"marc-mabe/php-enum": "^4.0",
"php": "^7.2 || ^8.0"
"php": ">=7.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.3.0",
"json-schema/json-schema-test-suite": "^23.2",
"marc-mabe/php-enum-phpstan": "^2.0",
"phpspec/prophecy": "^1.19",
"phpstan/phpstan": "^1.12",
"phpunit/phpunit": "^8.5"
"friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1",
"json-schema/json-schema-test-suite": "1.2.0",
"phpunit/phpunit": "^4.8.35"
},
"bin": [
"bin/validate-json"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.x-dev"
}
},
"autoload": {
"psr-4": {
"JsonSchema\\": "src/JsonSchema/"
@ -710,36 +682,36 @@
}
],
"description": "A library to validate a json schema.",
"homepage": "https://github.com/jsonrainbow/json-schema",
"homepage": "https://github.com/justinrainbow/json-schema",
"keywords": [
"json",
"schema"
],
"support": {
"issues": "https://github.com/jsonrainbow/json-schema/issues",
"source": "https://github.com/jsonrainbow/json-schema/tree/6.6.1"
"source": "https://github.com/jsonrainbow/json-schema/tree/5.3.0"
},
"time": "2025-11-07T18:30:29+00:00"
"time": "2024-07-06T21:00:26+00:00"
},
{
"name": "localheinz/diff",
"version": "1.3.0",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/localheinz/diff.git",
"reference": "33bd840935970cda6691c23fc7d94ae764c0734c"
"reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/localheinz/diff/zipball/33bd840935970cda6691c23fc7d94ae764c0734c",
"reference": "33bd840935970cda6691c23fc7d94ae764c0734c",
"url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c",
"reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c",
"shasum": ""
},
"require": {
"php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
"php": "^7.1 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^7.5.0 || ^8.5.23",
"phpunit/phpunit": "^7.5 || ^8.0",
"symfony/process": "^4.2 || ^5"
},
"type": "library",
@ -771,83 +743,15 @@
"unified diff"
],
"support": {
"issues": "https://github.com/localheinz/diff/issues",
"source": "https://github.com/localheinz/diff/tree/1.3.0"
"source": "https://github.com/localheinz/diff/tree/main"
},
"time": "2025-08-30T09:44:18+00:00"
},
{
"name": "marc-mabe/php-enum",
"version": "v4.7.2",
"source": {
"type": "git",
"url": "https://github.com/marc-mabe/php-enum.git",
"reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/bb426fcdd65c60fb3638ef741e8782508fda7eef",
"reference": "bb426fcdd65c60fb3638ef741e8782508fda7eef",
"shasum": ""
},
"require": {
"ext-reflection": "*",
"php": "^7.1 | ^8.0"
},
"require-dev": {
"phpbench/phpbench": "^0.16.10 || ^1.0.4",
"phpstan/phpstan": "^1.3.1",
"phpunit/phpunit": "^7.5.20 | ^8.5.22 | ^9.5.11",
"vimeo/psalm": "^4.17.0 | ^5.26.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-3.x": "3.2-dev",
"dev-master": "4.7-dev"
}
},
"autoload": {
"psr-4": {
"MabeEnum\\": "src/"
},
"classmap": [
"stubs/Stringable.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
"funding": [
{
"name": "Marc Bennewitz",
"email": "dev@mabe.berlin",
"homepage": "https://mabe.berlin/",
"role": "Lead"
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"description": "Simple and fast implementation of enumerations with native PHP",
"homepage": "https://github.com/marc-mabe/php-enum",
"keywords": [
"enum",
"enum-map",
"enum-set",
"enumeration",
"enumerator",
"enummap",
"enumset",
"map",
"set",
"type",
"type-hint",
"typehint"
],
"support": {
"issues": "https://github.com/marc-mabe/php-enum/issues",
"source": "https://github.com/marc-mabe/php-enum/tree/v4.7.2"
},
"time": "2025-09-14T11:18:39+00:00"
"time": "2020-07-06T04:49:32+00:00"
},
{
"name": "psr/event-dispatcher",
@ -1872,16 +1776,16 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v2.5.4",
"version": "v2.5.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "605389f2a7e5625f273b53960dc46aeaf9c62918"
"reference": "80d075412b557d41002320b96a096ca65aa2c98d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918",
"reference": "605389f2a7e5625f273b53960dc46aeaf9c62918",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d",
"reference": "80d075412b557d41002320b96a096ca65aa2c98d",
"shasum": ""
},
"require": {
@ -1889,12 +1793,12 @@
},
"type": "library",
"extra": {
"thanks": {
"url": "https://github.com/symfony/contracts",
"name": "symfony/contracts"
},
"branch-alias": {
"dev-main": "2.5-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
@ -1919,7 +1823,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4"
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3"
},
"funding": [
{
@ -1935,7 +1839,7 @@
"type": "tidelift"
}
],
"time": "2024-09-25T14:11:13+00:00"
"time": "2023-01-24T14:02:46+00:00"
},
{
"name": "symfony/error-handler",
@ -2174,16 +2078,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v5.4.50",
"version": "v5.4.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "1a0706e8b8041046052ea2695eb8aeee04f97609"
"reference": "168b77c71e6f02d8fc479db78beaf742a37d3cab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/1a0706e8b8041046052ea2695eb8aeee04f97609",
"reference": "1a0706e8b8041046052ea2695eb8aeee04f97609",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/168b77c71e6f02d8fc479db78beaf742a37d3cab",
"reference": "168b77c71e6f02d8fc479db78beaf742a37d3cab",
"shasum": ""
},
"require": {
@ -2230,7 +2134,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.4.50"
"source": "https://github.com/symfony/http-foundation/tree/v5.4.46"
},
"funding": [
{
@ -2241,16 +2145,12 @@
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2025-11-03T12:58:48+00:00"
"time": "2024-11-05T15:52:21+00:00"
},
{
"name": "symfony/http-kernel",
@ -2446,16 +2346,16 @@
},
{
"name": "symfony/polyfill-php80",
"version": "v1.33.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608"
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
"reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
"shasum": ""
},
"require": {
@ -2464,8 +2364,8 @@
"type": "library",
"extra": {
"thanks": {
"url": "https://github.com/symfony/polyfill",
"name": "symfony/polyfill"
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@ -2506,7 +2406,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0"
},
"funding": [
{
@ -2517,16 +2417,12 @@
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2025-01-02T08:10:11+00:00"
"time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-php81",
@ -2990,9 +2886,9 @@
"ext-json": "*",
"ext-mbstring": "*"
},
"platform-dev": {},
"platform-dev": [],
"platform-overrides": {
"php": "8.0"
},
"plugin-api-version": "2.6.0"
"plugin-api-version": "2.3.0"
}

View File

@ -53,16 +53,14 @@ class BTCPayPaymentModuleFrontController extends ModuleFrontController
try {
if (null !== ($redirect = $this->factory->createPaymentRequest($this->context->customer, $this->context->cart))) {
Tools::redirect($redirect);
Tools::redirectLink($redirect);
return;
}
$this->warning[] = $this->context->getTranslator()->trans('We could not create a payment request via BTCPay Server. Please try again or contact us.', [], 'Modules.Btcpay.Front');
$this->redirectWithNotifications($this->context->link->getPageLink('cart', $this->ssl));
} catch (\Throwable $throwable) {
PrestaShopLogger::addLog(\sprintf('[ERROR] An error occurred during payment creation: %s', $throwable), PrestaShopLogger::LOG_SEVERITY_LEVEL_ERROR, $throwable->getCode());
} catch (\Throwable) {
$this->warning[] = $this->context->getTranslator()->trans('We are having issues with our BTCPay Server backend. Please try again or contact us.', [], 'Modules.Btcpay.Front');
$this->redirectWithNotifications($this->context->link->getPageLink('cart', $this->ssl));
}

View File

@ -62,10 +62,7 @@ class ConfigureController extends FrameworkBundleAdminController
public function __construct(BTCPay $module, ValidatorInterface $validator, FormHandlerInterface $serverFormHandler, FormHandlerInterface $generalFormHandler)
{
// Fallback in case 8.0 is used // TODO: Remove once we make 9.0 the minimum
if (\version_compare(\_PS_VERSION_, '8.1.0', '<')) {
parent::__construct();
}
parent::__construct();
$this->module = $module;
$this->validator = $validator;
@ -299,7 +296,7 @@ class ConfigureController extends FrameworkBundleAdminController
protected function getConfiguration(): ShopConfigurationInterface
{
// Fallback in case 8.0 is used // TODO: Remove once we make 9.0 the minimum
// Fallback in case 8.0 is used // TODO: Remove once we make 8.1.0 the minimum
if (\version_compare(\_PS_VERSION_, '8.1.0', '<')) {
return $this->configuration;
}

View File

@ -135,6 +135,7 @@
<div class="card-deck">
<div class="card">
<h3 class="card-header">
<i class="material-icons">store</i>
{{ 'Store Information'|trans({}, 'Admin.Actions') }}
</h3>
@ -163,6 +164,7 @@
<div class="card">
<h3 class="card-header">
<i class="material-icons">info_outline</i>
{{ 'Server Information'|trans({}, 'Admin.Actions') }}
</h3>
@ -174,7 +176,7 @@
{% set webhook = client.webhook().getCurrent(storeId, webhookId) %}
<dt><span class="text-muted mb-0"><strong>{{ 'Webhook'|trans({}, 'Modules.Btcpay.Admin') }}</strong></span></dt>
{% if webhook is not null and webhook.enabled is defined and webhook.enabled %}
<dd><span class="text-success px-1"></span></dd>
<dd><span class="text-success px-1"><i class="material-icons">checkmark</i></span></dd>
{% elseif webhook is not null and webhook.enabled is defined and not webhook.enabled %}
<dd><span class="text-warning px-1">Webhook has been disabled, re-enable it again your store</span></dd>
{% else %}

View File

@ -49,7 +49,7 @@
<div class="nav nav-tabs" id="nav-tab" role="tablist">
{foreach $paymentMethods as $paymentMethod}
{if not empty($paymentMethod->getPayments())}
{assign currencyCode "_"|explode:($paymentMethod.paymentMethod|default:$paymentMethod.currency)|current}
{assign currencyCode "_"|explode:$paymentMethod.paymentMethod|current}
<a class="nav-item nav-link{if $paymentMethod@first} active{/if}" id="nav-{$currencyCode|strtolower|escape:'htmlall':'UTF-8'}-tab" data-toggle="tab" href="#nav-{$currencyCode|strtolower|escape:'htmlall':'UTF-8'}" role="tab" aria-controls="nav-{$currencyCode|strtolower|escape:'htmlall':'UTF-8'}" aria-selected="true">
<strong>{$currencyCode|escape:'htmlall':'UTF-8'}</strong>
</a>
@ -60,48 +60,48 @@
<div class="tab-content" id="nav-tabContent">
{foreach $paymentMethods as $paymentMethod}
{if not empty($paymentMethod->getPayments())}
{assign currencyCode "_"|explode:($paymentMethod.paymentMethod|default:$paymentMethod.currency)|current}
<div class="tab-pane fade{if $paymentMethod@first} show active{/if}" id="nav-{$currencyCode|strtolower|escape:'htmlall':'UTF-8'}" role="tabpanel" aria-labelledby="nav-{$currencyCode|strtolower|escape:'htmlall':'UTF-8'}-tab">
<table id="{$currencyCode|escape:'htmlall':'UTF-8'}-details" class="table table-bordered my-2">
<thead>
<tr>
<th class="table-head-rate">{l s='Rate' d='Modules.Btcpay.Global'}</th>
<th class="table-head-cart-amount">{l s='Invoice amount' d='Modules.Btcpay.Global'}</th>
<th class="table-head-paid-amount">{l s='Total amount paid in %s' sprintf=[$currencyCode|escape:'htmlall':'UTF-8'] d='Modules.Btcpay.Global'}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{$storeCurrency|escape:'htmlall':'UTF-8'} {$paymentMethod.rate|escape:'htmlall':'UTF-8'}</td>
<td>{$paymentMethod.amount|escape:'htmlall':'UTF-8'} {$paymentMethod.paymentMethod|escape:'htmlall':'UTF-8'}</td>
<td>{$paymentMethod.paymentMethodPaid|escape:'htmlall':'UTF-8'} {$paymentMethod.paymentMethod|escape:'htmlall':'UTF-8'}</td>
</tr>
</tbody>
</table>
<table id="{$currencyCode|escape:'htmlall':'UTF-8'}-payments" class="table table-bordered my-2">
<thead>
<tr>
<th class="table-head-date">{l s='Date' d='Modules.Btcpay.Global'}</th>
<th class="table-head-amount">{l s='Amount' d='Modules.Btcpay.Global'}</th>
<th class="table-head-destination">{l s='Transaction' d='Modules.Btcpay.Global'}</th>
</tr>
</thead>
<tbody>
{foreach $paymentMethod->getPayments() as $payment}
<tr>
<td>{$payment->getReceivedTimestamp()|date_format:"%Y-%m-%d %T"}</td>
<td>{$payment.value|escape:'htmlall':'UTF-8'} {$currencyCode|escape:'htmlall':'UTF-8'}</td>
{if $currencyCode == 'BTC'}
<td><a href="https://mempool.space/tx/{$payment->getTransactionId()|escape:'htmlall':'UTF-8'}" target="_blank" rel="noopener noreferrer nofollow">{$payment->getTransactionId()|escape:'htmlall':'UTF-8'}</a></td>
{else}
<td><a href="https://blockchair.com/search?q={$payment->getTransactionId()|escape:'htmlall':'UTF-8'}" target="_blank" rel="noopener noreferrer nofollow">{$payment->getTransactionId()|escape:'htmlall':'UTF-8'}</a></td>
{/if}
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
{assign currencyCode "_"|explode:$paymentMethod.paymentMethod|current}
<div class="tab-pane fade{if $paymentMethod@first} show active{/if}" id="nav-{$currencyCode|strtolower|escape:'htmlall':'UTF-8'}" role="tabpanel" aria-labelledby="nav-{$currencyCode|strtolower|escape:'htmlall':'UTF-8'}-tab">
<table id="{$currencyCode|escape:'htmlall':'UTF-8'}-details" class="table table-bordered my-2">
<thead>
<tr>
<th class="table-head-rate">{l s='Rate' d='Modules.Btcpay.Global'}</th>
<th class="table-head-cart-amount">{l s='Invoice amount' d='Modules.Btcpay.Global'}</th>
<th class="table-head-paid-amount">{l s='Total amount paid in %s' sprintf=[$currencyCode|escape:'htmlall':'UTF-8'] d='Modules.Btcpay.Global'}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{$storeCurrency|escape:'htmlall':'UTF-8'} {$paymentMethod.rate|escape:'htmlall':'UTF-8'}</td>
<td>{$paymentMethod.amount|escape:'htmlall':'UTF-8'} {$paymentMethod.paymentMethod|escape:'htmlall':'UTF-8'}</td>
<td>{$paymentMethod.paymentMethodPaid|escape:'htmlall':'UTF-8'} {$paymentMethod.paymentMethod|escape:'htmlall':'UTF-8'}</td>
</tr>
</tbody>
</table>
<table id="{$currencyCode|escape:'htmlall':'UTF-8'}-payments" class="table table-bordered my-2">
<thead>
<tr>
<th class="table-head-date">{l s='Date' d='Modules.Btcpay.Global'}</th>
<th class="table-head-amount">{l s='Amount' d='Modules.Btcpay.Global'}</th>
<th class="table-head-destination">{l s='Transaction' d='Modules.Btcpay.Global'}</th>
</tr>
</thead>
<tbody>
{foreach $paymentMethod->getPayments() as $payment}
<tr>
<td>{$payment->getReceivedTimestamp()|date_format:"%Y-%m-%d %T"}</td>
<td>{$payment.value|escape:'htmlall':'UTF-8'} {$currencyCode|escape:'htmlall':'UTF-8'}</td>
{if $currencyCode == 'BTC'}
<td><a href="https://mempool.space/tx/{$payment->getTransactionId()|escape:'htmlall':'UTF-8'}" target="_blank" rel="noopener noreferrer nofollow">{$payment->getTransactionId()|escape:'htmlall':'UTF-8'}</a></td>
{else}
<td><a href="https://blockchair.com/search?q={$payment->getTransactionId()|escape:'htmlall':'UTF-8'}" target="_blank" rel="noopener noreferrer nofollow">{$payment->getTransactionId()|escape:'htmlall':'UTF-8'}</a></td>
{/if}
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
{/foreach}
</div>
{/if}