Skip to content

Commit

Permalink
fix: replace pi with txn id
Browse files Browse the repository at this point in the history
  • Loading branch information
nyujacky committed Aug 28, 2024
1 parent b36f377 commit aa28b64
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions commerce_coordinator/apps/commercetools/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,20 +401,20 @@ def update_return_payment_state_after_successful_refund(self, order_id: str,
if not payment_intent_id:
payment_intent_id = ''

Check failure on line 402 in commerce_coordinator/apps/commercetools/clients.py

View workflow job for this annotation

GitHub Actions / tests (ubuntu-20.04, 3.8, django42)

Missing coverage

Missing coverage on line 402
logger.info(f'Creating return for order - payment_intent_id: {payment_intent_id}')

payment = self.get_payment_by_key(payment_intent_id)
logger.info(f"Payment found: {payment}")
order = self.get_order_by_id(order_id=order_id)
transaction_id = find_refund_transaction(order, amount_in_cents)
update_transaction_id_action = OrderSetReturnItemCustomTypeAction(
return_item_id=return_line_item_return_id,
type=CTTypeResourceIdentifier(
key='returnItemCustomType',
),
fields=CTFieldContainer({
'transactionId': payment_intent_id
'transactionId': transaction_id
})
)
payment = self.get_payment_by_key(payment_intent_id)
logger.info(f"Payment found: {payment}")
order = self.get_order_by_id(order_id=order_id)
transaction_id = find_refund_transaction(order, amount_in_cents)

return_transaction_return_item_action = PaymentSetTransactionCustomTypeAction(
transaction_id=transaction_id,
type=CTTypeResourceIdentifier(key='transactionCustomType'),
Expand Down

0 comments on commit aa28b64

Please sign in to comment.