mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 09:42:53 +00:00
Enhance API documentation tags and improve checkout URL handling in WaafiProvider
This commit is contained in:
@@ -100,7 +100,7 @@ export class WaafiProvider implements PaymentProvider {
|
||||
}
|
||||
|
||||
const transactionId = response.params?.transactionId;
|
||||
const checkoutUrl = response.params?.checkoutUrl;
|
||||
const checkoutUrl = response.params?.checkoutUrl || `${this.baseUrl}/checkout?ref=${transactionId}`;
|
||||
|
||||
if (!transactionId) {
|
||||
throw new Error(`Waafi returned no transactionId: ${JSON.stringify(response)}`);
|
||||
@@ -110,9 +110,7 @@ export class WaafiProvider implements PaymentProvider {
|
||||
|
||||
return {
|
||||
providerOrderId: transactionId,
|
||||
clientAction: checkoutUrl
|
||||
? { type: 'REDIRECT', url: checkoutUrl }
|
||||
: { type: 'NONE' },
|
||||
clientAction: { type: 'REDIRECT', url: checkoutUrl },
|
||||
expiresAt,
|
||||
rawInitiation: {
|
||||
request: this.sanitize(requestBody),
|
||||
|
||||
Reference in New Issue
Block a user