Skip to content

Commit

Permalink
fix: pay button
Browse files Browse the repository at this point in the history
  • Loading branch information
Srish-ty committed Nov 5, 2024
1 parent ccdc17b commit b6b26d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app/payment/payButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const PayButton = () => {
window.location.href = data.paymentUrl;
} else {
alert('Payment failed. Please try again.');
console.log(data);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/app/payment/payment.styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export const PayContainer = styled.div`
`;

export const PayButtonWrap = styled.div`
${tw`w-full bg-teal-600 px-4 py-3 rounded mx-3 hover:cursor-pointer my-5 flex flex-col items-center justify-center`}
${tw`w-full bg-teal-600 px-4 py-3 rounded mx-3 hover:cursor-pointer hover:bg-teal-700 my-5 flex flex-col items-center justify-center`}
`;
2 changes: 1 addition & 1 deletion src/pages/api/phonepePayment.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default async function handler(req, res) {
res.status(200).json(data);
} catch (error) {
console.error('Payment initiation failed:', error);
res.status(500).json({ error: 'Payment initiation failed' });
res.status(500).json({ error });
}
} else {
res.status(405).json({ error: 'Method not allowed' });
Expand Down

0 comments on commit b6b26d4

Please sign in to comment.