Discussions
CANCEL_OR_REFUND fails with code: 27, message: "Payment not allowed"
CANCEL_OR_REFUND fails with code: 27, message: "Payment not allowed" on the staging server. What could be the problem? The exactly same code that we use for making the request used to work before, so I wonder if the API has changed somehow in the last couple of months.
Below are posted relevant parts from our logs:
=========================================================
REQUEST OPTIONS:
=========================================================
{
"method": "PUT",
"url": "https://staging.authservices.satispay.com/g_business/v1/payments/5e314d91-5874-4de2-8ef1-caaaf9504e90",
"headers": {
"host": "staging.authservices.satispay.com",
"date": "Mon, 27 Sep 2021 08:49:30 +0000",
"digest": "SHA-256=uJ7Quj8bKvvUB8tmS6oOapuCc8MpAlaAwB2Hc32oxF8=",
"Authorization": "Signature keyId="7ptp7gh7vs0m5jad1h4hhlsvqmpn9hm4rtbh9k88e195gpvahv147cod6rm2n5posqlie7766qeqb6v613jk0vdgspojvncl3e79lbjb8uqs54va9aldno39754s0saqkkifsbbl8rd22qs9mfa6md0cpkn4ifg9k8hk3fp4sdgp0ribmrjlanhp7u42u8ljjniite3u", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="UNRSqG1G588jWM1BQDRgQ88XbA8cj3FNqG6UU/A2r8PbOt0Z2oxnS7DZ1JhHkUAcp5ksQP7jGkXfFUq82XD0ycZb0/khYBLBukFMGOlM2iRtzrFTsUP/YfG0EPTd6VfR6xOEnbQpySC2OHaEHbry5GAz/TtJD1Yst+GhrkYitxb/r4Pu/h33zNQQRuWF9FzhTPDxBccDUbKigKZp7kWGzhdAxAO8Sx5t7XheS6szPlrmikLLlIFDwUUvM+boEh5oYrpVg1ttrR8l8TrFBtgc2poDb+MYKFbzleycWE3FTMqxcFrFFzgHSiYqvc8Nv7GLSAxilNQczL/2tHMZxZOxADd/1N9AW9Ndr+CUy7GQipM7RCcPKZExdfK/IKl08FAAdi10ETXgRELBC6eTX8AmeGE/9Z+qNr8G41gqQ6CQAF0RboH79zKClN5LiVsEPzSxtf46lc/2EEPWFDb3cSrU/9O0ETbcoasCtokpNavNwLmFIlsc8LE6TSItUUj2BQAQdIYZDc+wsDwsiK91pJ/01UEZiGl7NYrdjfC4hNLjg/TnJHJ4SO3vP+bWm7luyjTNTLtFFRw4Qs/KyJehYXazW5vwKme5f+tYzvNCfxyyzAqOgDFY+9bvkA9SsjUa5O/wwKR9ZXzPsiQjNa124fQiyIcanj6tc/7P5hjAWlwy7D0="",
"Accept": "application/json",
"Content-Type": "application/json"
},
"body": "{"action":"CANCEL_OR_REFUND","description":"Ref: 111"}"
}
=========================================================
REQUEST URL:
=========================================================
https://staging.authservices.satispay.com/g_business/v1/payments/5e314d91-5874-4de2-8ef1-caaaf9504e90
=========================================================
put request headers:
=========================================================
{
"host": "staging.authservices.satispay.com",
"date": "Mon, 27 Sep 2021 08:49:30 +0000",
"digest": "SHA-256=uJ7Quj8bKvvUB8tmS6oOapuCc8MpAlaAwB2Hc32oxF8=",
"Authorization": "Signature keyId="7ptp7gh7vs0m5jad1h4hhlsvqmpn9hm4rtbh9k88e195gpvahv147cod6rm2n5posqlie7766qeqb6v613jk0vdgspojvncl3e79lbjb8uqs54va9aldno39754s0saqkkifsbbl8rd22qs9mfa6md0cpkn4ifg9k8hk3fp4sdgp0ribmrjlanhp7u42u8ljjniite3u", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="UNRSqG1G588jWM1BQDRgQ88XbA8cj3FNqG6UU/A2r8PbOt0Z2oxnS7DZ1JhHkUAcp5ksQP7jGkXfFUq82XD0ycZb0/khYBLBukFMGOlM2iRtzrFTsUP/YfG0EPTd6VfR6xOEnbQpySC2OHaEHbry5GAz/TtJD1Yst+GhrkYitxb/r4Pu/h33zNQQRuWF9FzhTPDxBccDUbKigKZp7kWGzhdAxAO8Sx5t7XheS6szPlrmikLLlIFDwUUvM+boEh5oYrpVg1ttrR8l8TrFBtgc2poDb+MYKFbzleycWE3FTMqxcFrFFzgHSiYqvc8Nv7GLSAxilNQczL/2tHMZxZOxADd/1N9AW9Ndr+CUy7GQipM7RCcPKZExdfK/IKl08FAAdi10ETXgRELBC6eTX8AmeGE/9Z+qNr8G41gqQ6CQAF0RboH79zKClN5LiVsEPzSxtf46lc/2EEPWFDb3cSrU/9O0ETbcoasCtokpNavNwLmFIlsc8LE6TSItUUj2BQAQdIYZDc+wsDwsiK91pJ/01UEZiGl7NYrdjfC4hNLjg/TnJHJ4SO3vP+bWm7luyjTNTLtFFRw4Qs/KyJehYXazW5vwKme5f+tYzvNCfxyyzAqOgDFY+9bvkA9SsjUa5O/wwKR9ZXzPsiQjNa124fQiyIcanj6tc/7P5hjAWlwy7D0="",
"Accept": "application/json",
"Content-Type": "application/json"
}
=========================================================
2021-09-27 08:49:30 [i] [SatispayManager] RESPONSE:
=========================================================
{
"statusCode": 400,
"body": "{"code":27,"message":"Payment not allowed","wlt":"TwiZogpO"}",
"headers": {
"date": "Mon, 27 Sep 2021 08:49:30 GMT",
"server": "Apache",
"x-satispay-nch-ofer": "thjCfc5dRB",
"x-satispay-cid": "TwiZogpO",
"digest": "SHA-256=w6sG0GsmsEhQIniNRG5AuaaokXlXiUY25kNn486Y+e0=",
"content-type": "application/json",
"content-length": "60",
"connection": "close"
},
"request": {
"uri": {
"protocol": "https:",
"slashes": true,
"auth": null,
"host": "staging.authservices.satispay.com",
"port": 443,
"hostname": "staging.authservices.satispay.com",
"hash": null,
"search": null,
"query": null,
"pathname": "/g_business/v1/payments/5e314d91-5874-4de2-8ef1-caaaf9504e90",
"path": "/g_business/v1/payments/5e314d91-5874-4de2-8ef1-caaaf9504e90",
"href": "https://staging.authservices.satispay.com/g_business/v1/payments/5e314d91-5874-4de2-8ef1-caaaf9504e90"
},
"method": "PUT",
"headers": {
"host": "staging.authservices.satispay.com",
"date": "Mon, 27 Sep 2021 08:49:30 +0000",
"digest": "SHA-256=uJ7Quj8bKvvUB8tmS6oOapuCc8MpAlaAwB2Hc32oxF8=",
"Authorization": "Signature keyId="7ptp7gh7vs0m5jad1h4hhlsvqmpn9hm4rtbh9k88e195gpvahv147cod6rm2n5posqlie7766qeqb6v613jk0vdgspojvncl3e79lbjb8uqs54va9aldno39754s0saqkkifsbbl8rd22qs9mfa6md0cpkn4ifg9k8hk3fp4sdgp0ribmrjlanhp7u42u8ljjniite3u", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="UNRSqG1G588jWM1BQDRgQ88XbA8cj3FNqG6UU/A2r8PbOt0Z2oxnS7DZ1JhHkUAcp5ksQP7jGkXfFUq82XD0ycZb0/khYBLBukFMGOlM2iRtzrFTsUP/YfG0EPTd6VfR6xOEnbQpySC2OHaEHbry5GAz/TtJD1Yst+GhrkYitxb/r4Pu/h33zNQQRuWF9FzhTPDxBccDUbKigKZp7kWGzhdAxAO8Sx5t7XheS6szPlrmikLLlIFDwUUvM+boEh5oYrpVg1ttrR8l8TrFBtgc2poDb+MYKFbzleycWE3FTMqxcFrFFzgHSiYqvc8Nv7GLSAxilNQczL/2tHMZxZOxADd/1N9AW9Ndr+CUy7GQipM7RCcPKZExdfK/IKl08FAAdi10ETXgRELBC6eTX8AmeGE/9Z+qNr8G41gqQ6CQAF0RboH79zKClN5LiVsEPzSxtf46lc/2EEPWFDb3cSrU/9O0ETbcoasCtokpNavNwLmFIlsc8LE6TSItUUj2BQAQdIYZDc+wsDwsiK91pJ/01UEZiGl7NYrdjfC4hNLjg/TnJHJ4SO3vP+bWm7luyjTNTLtFFRw4Qs/KyJehYXazW5vwKme5f+tYzvNCfxyyzAqOgDFY+9bvkA9SsjUa5O/wwKR9ZXzPsiQjNa124fQiyIcanj6tc/7P5hjAWlwy7D0="",
"Accept": "application/json",
"Content-Type": "application/json",
"content-length": 54
}
}
}
=========================================================