mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 07:08:18 +00:00
fix(eims): sign the /v1/verify request body
This commit is contained in:
@@ -214,10 +214,13 @@ export class EimsInvoiceRegistrationService {
|
||||
* compared — the supplied collection's own fixture uses different example values on each side,
|
||||
* so equality there would assert a property of the mock rather than of the gateway.
|
||||
*
|
||||
* Bearer-authenticated but unsigned, via `postBearer` — see that method for why.
|
||||
* Signed, via `postSigned`. The supplied collection shows a raw `{"irn":"…"}` body, but the live
|
||||
* gateway rejects that with `GATEWAY ERROR code=4001` naming `request`, `signature` and
|
||||
* `certificate` as null — verified against `core.mor.gov.et` on 2026-09-01. The signed envelope
|
||||
* clears that validation. The collection's unsigned example is wrong for this endpoint.
|
||||
*/
|
||||
private async queryVerify(irn: string): Promise<EimsVerifyResponse> {
|
||||
const response = await this.client.postBearer<EimsVerifyRequest, EimsVerifyResponse>(
|
||||
const response = await this.client.postSigned<EimsVerifyRequest, EimsVerifyResponse>(
|
||||
"/v1/verify",
|
||||
{ irn },
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user