btcpayserver/commerce_btcpay

Drupal 10 Ready

Closed this issue · 4 comments

Hi,

I have just tried testing this module on drupal 9.5.4 and get the following error when trying to add and save the paircode in the Test Mode. Is this an easy fix that someone can look at. Ideally it should also be working with the latest Drupal 10 version.

Error message

Deprecated function: Bitpay\Point implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in include() (line 14 of /webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/Point.php).

include('/webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/Point.php') (Line: 571)
Composer\Autoload\includeFile('/webroot/drupal10/vendor/composer/../ndeet/php-bitpay-client-legacy/src/Bitpay/Point.php') (Line: 428)
Composer\Autoload\ClassLoader->loadClass('Bitpay\Point') (Line: 14)
include('/webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/Key.php') (Line: 571)
Composer\Autoload\includeFile('/webroot/drupal10/vendor/composer/../ndeet/php-bitpay-client-legacy/src/Bitpay/Key.php') (Line: 428)
Composer\Autoload\ClassLoader->loadClass('Bitpay\Key') (Line: 18)
include('/webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/PrivateKey.php') (Line: 571)
Composer\Autoload\includeFile('/webroot/drupal10/vendor/composer/../ndeet/php-bitpay-client-legacy/src/Bitpay/PrivateKey.php') (Line: 428)
Composer\Autoload\ClassLoader->loadClass('Bitpay\PrivateKey') (Line: 626)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->createToken('testnet', 'X8zyHia') (Line: 291)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->submitConfigurationForm(Array, Object) (Line: 126)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration->submitInlineForm(Array, Object) (Line: 159)
Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::runSubmit(Array, Object)
call_user_func_array(Array, Array) (Line: 141)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 134)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 86)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::executeElementSubmitHandlers(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'commerce_payment_gateway_edit_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Deprecated function: Bitpay\PrivateKey implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in include() (line 18 of /webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/PrivateKey.php).

include('/webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/PrivateKey.php') (Line: 571)
Composer\Autoload\includeFile('/webroot/drupal10/vendor/composer/../ndeet/php-bitpay-client-legacy/src/Bitpay/PrivateKey.php') (Line: 428)
Composer\Autoload\ClassLoader->loadClass('Bitpay\PrivateKey') (Line: 626)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->createToken('testnet', 'X8zyHia') (Line: 291)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->submitConfigurationForm(Array, Object) (Line: 126)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration->submitInlineForm(Array, Object) (Line: 159)
Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::runSubmit(Array, Object)
call_user_func_array(Array, Array) (Line: 141)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 134)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 86)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::executeElementSubmitHandlers(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'commerce_payment_gateway_edit_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Warning: file_put_contents(private://btcpay_testnet.key): Failed to open stream: "Drupal\Core\StreamWrapper\PrivateStream::stream_open" call failed in Bitpay\Storage\EncryptedFilesystemStorage->persist() (line 64 of /webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/Storage/EncryptedFilesystemStorage.php).

Bitpay\Storage\EncryptedFilesystemStorage->persist(Object) (Line: 34)
Bitpay\KeyManager->persist(Object) (Line: 628)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->createToken('testnet', 'X8zyHia') (Line: 291)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->submitConfigurationForm(Array, Object) (Line: 126)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration->submitInlineForm(Array, Object) (Line: 159)
Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::runSubmit(Array, Object)
call_user_func_array(Array, Array) (Line: 141)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 134)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 86)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::executeElementSubmitHandlers(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'commerce_payment_gateway_edit_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Deprecated function: Bitpay\PublicKey implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in include() (line 16 of /webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/PublicKey.php).

include('/webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/PublicKey.php') (Line: 571)
Composer\Autoload\includeFile('/webroot/drupal10/vendor/composer/../ndeet/php-bitpay-client-legacy/src/Bitpay/PublicKey.php') (Line: 428)
Composer\Autoload\ClassLoader->loadClass('Bitpay\PublicKey') (Line: 630)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->createToken('testnet', 'X8zyHia') (Line: 291)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->submitConfigurationForm(Array, Object) (Line: 126)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration->submitInlineForm(Array, Object) (Line: 159)
Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::runSubmit(Array, Object)
call_user_func_array(Array, Array) (Line: 141)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 134)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 86)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::executeElementSubmitHandlers(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'commerce_payment_gateway_edit_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Warning: file_put_contents(private://btcpay_testnet.pub): Failed to open stream: "Drupal\Core\StreamWrapper\PrivateStream::stream_open" call failed in Bitpay\Storage\EncryptedFilesystemStorage->persist() (line 64 of /webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/Storage/EncryptedFilesystemStorage.php).

Bitpay\Storage\EncryptedFilesystemStorage->persist(Object) (Line: 34)
Bitpay\KeyManager->persist(Object) (Line: 633)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->createToken('testnet', 'X8zyHia') (Line: 291)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->submitConfigurationForm(Array, Object) (Line: 126)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration->submitInlineForm(Array, Object) (Line: 159)
Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::runSubmit(Array, Object)
call_user_func_array(Array, Array) (Line: 141)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 134)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 86)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::executeElementSubmitHandlers(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'commerce_payment_gateway_edit_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Deprecated function: Bitpay\SinKey implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in include() (line 16 of /webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/SinKey.php).

include('/webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/SinKey.php') (Line: 571)
Composer\Autoload\includeFile('/webroot/drupal10/vendor/composer/../ndeet/php-bitpay-client-legacy/src/Bitpay/SinKey.php') (Line: 428)
Composer\Autoload\ClassLoader->loadClass('Bitpay\SinKey') (Line: 640)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->createToken('testnet', 'X8zyHia') (Line: 291)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->submitConfigurationForm(Array, Object) (Line: 126)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration->submitInlineForm(Array, Object) (Line: 159)
Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::runSubmit(Array, Object)
call_user_func_array(Array, Array) (Line: 141)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 134)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 86)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::executeElementSubmitHandlers(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'commerce_payment_gateway_edit_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Warning: Undefined array key 2 in Bitpay\Client\Response::createFromRawResponse() (line 76 of /webroot/drupal10/vendor/ndeet/php-bitpay-client-legacy/src/Bitpay/Client/Response.php).

Bitpay\Client\Response::createFromRawResponse('HTTP/2 404 
server: nginx
date: Thu, 18 May 2023 17:04:01 GMT
content-type: application/json
access-control-allow-origin: *
content-security-policy: script-src 'self'
referrer-policy: same-origin
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
x-frame-options: DENY
strict-transport-security: max-age=31536000

{"error":"The specified pairingCode is not found"}') (Line: 81)
Bitpay\Client\Adapter\CurlAdapter->sendRequest(Object) (Line: 643)
Bitpay\Client\Client->sendRequest(Object) (Line: 548)
Bitpay\Client\Client->createToken(Array) (Line: 652)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->createToken('testnet', 'X8zyHia') (Line: 291)
Drupal\commerce_btcpay\Plugin\Commerce\PaymentGateway\BtcPay->submitConfigurationForm(Array, Object) (Line: 126)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration->submitInlineForm(Array, Object) (Line: 159)
Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::runSubmit(Array, Object)
call_user_func_array(Array, Array) (Line: 141)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 134)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::doExecuteSubmitHandlers(Array, Object) (Line: 86)
Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration::executeElementSubmitHandlers(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'commerce_payment_gateway_edit_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('commerce_payment_gateway_edit_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Failed to create testnet token: 0: The specified pairingCode is not found
ndeet commented

Hi, I just tried to reproduce this with latest Drupal 9.5.9 running on PHP 8.1 and it works without any problem. The deprecation warnings should not yet be a problem. Also your paths show drupal10/, are you sure running on D9? What is your PHP version?

Also check the installation instructions about the private file storage, you need to have it writable and setup so that the key can get properly stored. Let me know if this is the case and you can write to private file storage.

I will check D10 in the next couple of days.

i tried with D10 and it didnt work so tried with D9 in teh same directory path.

I will try again over the next few days when I get a chance since you have confirmed it should still work despite the deprecation messages.

Let me know how you get on with D10.0 and D10.1
Thanks

I can confirm that it works as expected on D9. I was just fooled before by the deprecation messages and never continued to test up to the point when it presents the QR code for payment. Thank you. I would expect it to work for 10.0 as well but not sure about 10.1.

ndeet commented

Hey @mnsmithuk I just released a new major release 2.0.0-alpha1 (see here) that supports Drupal 10 (and 9). There was a breaking change in the Symfony versions between 8 and 10 which needed a change in the client library for D10. This will also likely work with the upcoming D10.1 which is in beta at the moment, breaking changes are only done with major releases and point releases in Drupal 10 only receive new features and deprecate old code (which is then removed with the next major release, D11 in this case).