cc-tracking/tasks/archive/comcarde/bridge-1001/comment.md

53 lines
1.6 KiB
Markdown
Raw Normal View History

2018-05-04 10:22:47 +00:00
So I've been looking into this and I updated get-all-atps-for-rtp.spec.js with a new response test.
I pushed the following 'bad' data through as the response:
```
{
data: [
{
atpID: '5aeadbff0139b01a9ac983ea',
rtpID: '5aeadbff0139b01a9ac983e7',
payerID: '79a26d981246978135edadf1',
amount: {
value: 101,
currency: 'GBP'
},
lastUpdate: '2018-05-03T09:53:03.746Z',
status: 'Failed',
payerDetails: {
payer: {
email: 'servertest1@comcarde.com',
firstName: 'Server',
lastName: 'Test'
},
card: {
cardPAN: '4*** **** **** *111',
nameOnAccount: 'Server Test'
}
},
payeeID: 'dc870f553840a414962875b3',
payeeInstrument: {
accountType: 'Worldpay Online Payments Account'
},
transactionDetails: {
orderDescription: 'create RTP for the user 79a26d981246978135edadf1 for List Test'
},
resultDetails: {
errorDetails: {
statusCode: 400,
code: 538,
info: 'Error processing payment',
processorResponse: {
customCode: 'BAD_REQUEST',
message: 'Expiry date [1/2000] is in past'
}
}
},
lastVersion: 4
}
]
}
```
Swagger was happy to accept this and didn't give me an error.