mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
feat: ( payment ) implement d-money
This commit is contained in:
@@ -203,6 +203,7 @@ export default function PaymentMethodsPage() {
|
||||
{ value: 'CBE_BIRR', label: 'CBE Birr' },
|
||||
{ value: 'EBIRR', label: 'eBirr' },
|
||||
{ value: 'WAAFI', label: 'Waafi' },
|
||||
{ value: 'DMONEY', label: 'dMoney' },
|
||||
{ value: 'CARD', label: 'Card Payment' },
|
||||
{ value: 'WALLET', label: 'Internal Wallet' },
|
||||
];
|
||||
|
||||
@@ -124,7 +124,7 @@ export default function PaymentPage() {
|
||||
onSuccess: async (data: any) => {
|
||||
setPaymentError(null);
|
||||
|
||||
if ((selectedMethod === 'TELEBIRR' || selectedMethod === 'WAAFI') && data?.clientAction?.type === 'REDIRECT') {
|
||||
if ((selectedMethod === 'TELEBIRR' || selectedMethod === 'WAAFI' || selectedMethod === 'DMONEY') && data?.clientAction?.type === 'REDIRECT') {
|
||||
setPaymentIntent(data.intentId);
|
||||
updateStatus("REQUIRES_ACTION");
|
||||
window.location.href = data.clientAction.url;
|
||||
|
||||
@@ -23,7 +23,10 @@ import { useSearchParams } from "next/navigation";
|
||||
*/
|
||||
|
||||
const ALLOWED_HOSTS = (
|
||||
process.env.NEXT_PUBLIC_DMONEY_ALLOWED_HOSTS ?? "d-money.dj"
|
||||
// Default allows both D-Money environments:
|
||||
// test/sandbox → pgtest.d-money.dj (base domain d-money.dj)
|
||||
// production → pg.d-moneyservice.dj (base domain d-moneyservice.dj)
|
||||
process.env.NEXT_PUBLIC_DMONEY_ALLOWED_HOSTS ?? "d-money.dj,d-moneyservice.dj"
|
||||
)
|
||||
.split(",")
|
||||
.map((h) => h.trim().toLowerCase())
|
||||
|
||||
Reference in New Issue
Block a user