Problem / motivation

Currently response error codes are only stored in the PaymentGatewayException error code, but not in the error message.
By default, exception error codes which contain relevant information about the error are not logged. (Payment init failed)

Proposed solution

Add error code to the exception's message in:
\Drupal\commerce_otpsp\PluginForm\SimplePayRedirectOffSitePaymentForm::buildConfigurationForm
something like

      throw new PaymentGatewayException(sprintf('Payment init failed, code: %s', $paymentResponse->errorCodes[0]));

and fix invalid exception initialization in
\Drupal\commerce_otpsp\Plugin\Commerce\PaymentGateway\SimplePay::onReturnUpdatePayment

CommentFileSizeAuthor
#2 3134386.patch1.47 KBbpstr

Comments

bpstr created an issue. See original summary.

bpstr’s picture

StatusFileSize
new1.47 KB