Skip to content

Commit

Permalink
feat: Support refund and cancel for Stripe payment integration #676
Browse files Browse the repository at this point in the history
  • Loading branch information
treoden committed Dec 26, 2024
1 parent 2a53f41 commit efa2d9b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 67 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { Shipping } from '@components/admin/oms/orderEdit/payment/Shipping';
import { SubTotal } from '@components/admin/oms/orderEdit/payment/SubTotal';
import { Tax } from '@components/admin/oms/orderEdit/payment/Tax';
import { Total } from '@components/admin/oms/orderEdit/payment/Total';
import { Transactions } from '@components/admin/oms/orderEdit/payment/Transactions';

export default function OrderSummary({
order: {
Expand All @@ -24,8 +23,7 @@ export default function OrderSummary({
subTotal,
shippingFeeInclTax,
currency,
paymentStatus,
transactions
paymentStatus
}
}) {
return (
Expand Down Expand Up @@ -84,9 +82,6 @@ export default function OrderSummary({
]}
/>
</Card.Session>
<Card.Session>
<Transactions transactions={transactions} />
</Card.Session>
<Area id="orderPaymentActions" />
</Card>
);
Expand Down Expand Up @@ -121,18 +116,7 @@ OrderSummary.propTypes = {
badge: PropTypes.string,
progress: PropTypes.string,
name: PropTypes.string
}).isRequired,
transactions: PropTypes.arrayOf(
PropTypes.shape({
paymentTransactionId: PropTypes.number.isRequired,
amount: PropTypes.shape({
text: PropTypes.string.isRequired,
value: PropTypes.number.isRequired
}).isRequired,
paymentAction: PropTypes.string.isRequired,
transactionType: PropTypes.string.isRequired
})
).isRequired
}).isRequired
}).isRequired
};

Expand Down Expand Up @@ -172,15 +156,6 @@ export const query = `
progress
name
}
transactions: paymentTransactions {
paymentTransactionId
amount {
text(currency: getContextValue("orderCurrency"))
value
}
paymentAction
transactionType
}
}
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module.exports = async (request, response, delegate, next) => {
await insert('order_activity')
.given({
order_activity_order_id: order.order_id,
comment: `Customer paid by using credit card. Transaction ID: ${paymentIntent.id}`
comment: `Customer paid by using Stripe. Transaction ID: ${paymentIntent.id}`
})
.execute(connection);

Expand Down Expand Up @@ -119,7 +119,7 @@ module.exports = async (request, response, delegate, next) => {
await insert('order_activity')
.given({
order_activity_order_id: order.order_id,
comment: `Customer authorized by using credit card. Transaction ID: ${paymentIntent.id}`
comment: `Customer authorized by using Stripe. Transaction ID: ${paymentIntent.id}`
})
.execute(connection);

Expand Down

0 comments on commit efa2d9b

Please sign in to comment.