The API response contains a detailed error message, which is masked by a generic message in Payone_Core_Model_Service_Payment_Abstract::execute()
.
This patch creates the Mage exception with the customermessage.
diff --git a/magento/app/code/community/Payone/Core/Model/Service/Payment/Abstract.php b/magento/app/code/community/Payone/Core/Model/Service/Payment/Abstract.php | |
index 27bdcd1..60f0bfa 100644 | |
--- a/magento/app/code/community/Payone/Core/Model/Service/Payment/Abstract.php | |
+++ b/magento/app/code/community/Payone/Core/Model/Service/Payment/Abstract.php | |
@@ -85,7 +85,7 @@ abstract class Payone_Core_Model_Service_Payment_Abstract | |
if ($response instanceof Payone_Api_Response_Error) { | |
/** @var $response Payone_Api_Response_Error */ | |
- $this->throwMageException('There has been an error processing your payment'); | |
+ $this->throwMageException($response->getCustomermessage()); | |
} | |
return $response; |