@t-0/provider-starter-ts 0.4.13 → 0.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/src/service.ts +15 -3
package/package.json
CHANGED
package/template/src/service.ts
CHANGED
|
@@ -27,13 +27,25 @@ const CreateProviderService = (networkClient: Client<typeof NetworkService>) =>
|
|
|
27
27
|
|
|
28
28
|
async payOut(req: PayoutRequest, _: HandlerContext) {
|
|
29
29
|
// TODO: Step 2.4 implement how you do payouts (payments initiated by your counterparts)
|
|
30
|
-
console.log(`Received payout request ${req.
|
|
30
|
+
console.log(`Received payout request ${req.paymentId}`)
|
|
31
31
|
|
|
32
32
|
//TODO: confirmPayout should be called when you system notifies that payout has been made successfully
|
|
33
33
|
setInterval(() => {
|
|
34
|
-
networkClient.
|
|
34
|
+
networkClient.finalizePayout({
|
|
35
35
|
paymentId: req.paymentId,
|
|
36
|
-
|
|
36
|
+
result: {
|
|
37
|
+
case: 'success',
|
|
38
|
+
value: {
|
|
39
|
+
receipt: {
|
|
40
|
+
details: {
|
|
41
|
+
case: 'sepa',
|
|
42
|
+
value: {
|
|
43
|
+
bankingTransactionReferenceId: '1234567890',
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
}
|
|
37
49
|
})
|
|
38
50
|
}, 2000);
|
|
39
51
|
return {
|