Payment gateaway
# fix - Alur setelah pembayaran ### Issue: - Payment notif akan di perbaharui
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export default async function funTotalInvestorByIdInvestasi(id: string) {
|
||||
export default async function funTotalInvestorByIdInvestasi(id: any) {
|
||||
// console.log(id)
|
||||
const data = await prisma.transaksiInvestasi.count({
|
||||
where: {
|
||||
|
||||
@@ -5,7 +5,7 @@ import prisma from "@/app/lib/prisma";
|
||||
export async function getListAllPublish() {
|
||||
const data = await prisma.investasi.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
countDown: "asc",
|
||||
},
|
||||
where: {
|
||||
MasterStatusInvestasi: {
|
||||
|
||||
@@ -7,7 +7,7 @@ export default async function getListTransaksiBerhasilInvestasi(
|
||||
) {
|
||||
const data = await prisma.transaksiInvestasi.findMany({
|
||||
orderBy: {
|
||||
createdAt: "desc"
|
||||
createdAt: "desc",
|
||||
},
|
||||
where: {
|
||||
authorId: idAuthor,
|
||||
@@ -15,7 +15,16 @@ export default async function getListTransaksiBerhasilInvestasi(
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
Investasi: true,
|
||||
Investasi: {
|
||||
select: {
|
||||
author: true,
|
||||
imagesId: true,
|
||||
title: true,
|
||||
totalLembar: true,
|
||||
sisaLembar: true,
|
||||
|
||||
},
|
||||
},
|
||||
Author: true,
|
||||
gross_amount: true,
|
||||
quantity: true,
|
||||
|
||||
@@ -3,14 +3,6 @@
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import MidTrans from "midtrans-client";
|
||||
|
||||
// const midtransClient = require("midtrans-client");
|
||||
|
||||
// const snap = new midtransClient.Snap({
|
||||
// isProduction: false,
|
||||
// serverKey: process.env.Server_KEY,
|
||||
// clientKey: process.env.Client_KEY,
|
||||
// });
|
||||
|
||||
const snap = new MidTrans.Snap({
|
||||
isProduction: false,
|
||||
serverKey: process.env.Server_KEY,
|
||||
@@ -58,14 +50,14 @@ export default async function getTokenTransaksi(data) {
|
||||
free_text: {
|
||||
inquiry: [
|
||||
{
|
||||
en: "text in English",
|
||||
id: "text in Bahasa Indonesia",
|
||||
en: "Pay according to the invoice",
|
||||
id: "Bayar sesuai faktur",
|
||||
},
|
||||
],
|
||||
payment: [
|
||||
{
|
||||
en: "text in English",
|
||||
id: "text in Bahasa Indonesia",
|
||||
en: "Pay according to the invoice",
|
||||
id: "Bayar sesuai faktur",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user