Conversation
| expect(data.isSuccess()).toBeTruthy(); | ||
| }); | ||
| }); | ||
| }); //Add 10s timeout as third param |
There was a problem hiding this comment.
can you remove this comment? it doesn't seem useful
| .specification(RequestTypes.Transaction) | ||
| .request() | ||
| .then((data) => { | ||
| console.log(data); |
There was a problem hiding this comment.
can you delete this log
| beforeEach(() => { | ||
| method = buckarooClientTest.method('transfer'); | ||
| }); |
There was a problem hiding this comment.
can you follow the same approach with the tests above? I hadn’t noticed it there. Let’s use a consistent flow for all of them
| // const authResponse = await method.authorize(payload).request(); | ||
| // expect(authResponse.isSuccess()).toBeTruthy(); | ||
| // let key = authResponse.getTransactionKey(); | ||
| // expect(key).toBeDefined(); | ||
|
|
||
| // new Promise((resolve) => setTimeout(resolve, 6000)); |
There was a problem hiding this comment.
can you delete these comments if they’re not useful?
| amountDebit: payload.amountDebit, | ||
| articles: payload.articles, | ||
| ...payload, | ||
| originalTransactionKey: '1234', |
There was a problem hiding this comment.
can you use real transaction keys (as you did in the other cases) to avoid confusion when reviewing these tests and their transaction key format?
| const getServiceParameter = (response: any, name: string): string => { | ||
| const param = (response.getServices()?.[0]?.parameters as { name: string; value: any }[] | undefined)?.find( | ||
| (p) => p.name === name | ||
| ); | ||
| return String(param?.value ?? ''); | ||
| }; |
There was a problem hiding this comment.
maybe you could move this to the test helper file, you might need it elsewhere
There was a problem hiding this comment.
Removed it from this class since it is already defined in a helper class
| }); | ||
| .request(); | ||
|
|
||
| console.log(response.getStatusCode()); |
There was a problem hiding this comment.
can you delete this log
| // No valid subscription found for service 'emandateb2b'. | ||
| // test('CancelMandate', async () => { | ||
| // const response = await method | ||
| // .setServiceCode('emandateb2b' as ServiceCode) | ||
| // .cancelMandate({ | ||
| // mandateId: '1DC7F83B7B937864FB39966B0C08A7B86D8', | ||
| // purchaseId: '6383d3e86944a0', | ||
| // }) | ||
| // .request(); | ||
| // expect(response.isSuccess()).toBeTruthy(); | ||
| // }); |
There was a problem hiding this comment.
hmm maybe we should enable this subscription "emandate" in Plaza (check with @Buckaroo-Rene)
| }); | ||
|
|
||
| describe('Testing capayable methods', () => { | ||
| // "Action Pay is no longer available for Capayable" |
There was a problem hiding this comment.
@vildanbina
Seems like PayInInstallments and refund are the only actions supported by Capayable (In3Old).
Check the docs.
However, we still have the pay action defined in our implementation. Should I remove it?
| "axios": "^1.6.2", | ||
| "crypto-js": "^4.1.1", | ||
| "ip-address": "^8.1.0", | ||
| "lodash": "^4.17.21", |
There was a problem hiding this comment.
if lodash is used only for tests atm, can you move this to devDependencies for now?
|
and finally, please run prettier to format the code |
No description provided.