@@ -2,7 +2,7 @@ package phoenix.services.returns
2
2
3
3
import cats .implicits ._
4
4
import core .db ._
5
- import failures .GeneralFailure
5
+ import core . failures .GeneralFailure
6
6
import phoenix .failures .OrderFailures .{OnlyOneExternalPaymentIsAllowed , OrderPaymentNotFoundFailure }
7
7
import phoenix .failures .ReturnFailures ._
8
8
import phoenix .models .account .{Scope , User , Users }
@@ -21,7 +21,7 @@ import phoenix.utils.aliases._
21
21
import phoenix .utils .apis .{Apis , RefundReason }
22
22
import slick .jdbc .PostgresProfile .api ._
23
23
import scala .annotation .tailrec
24
- import utils .db ._
24
+ import core .db ._
25
25
import phoenix .models .payment .applepay .ApplePayments
26
26
27
27
object ReturnPaymentManager {
@@ -337,16 +337,16 @@ object ReturnPaymentManager {
337
337
((id : String , amount : Int ) ⇒
338
338
for {
339
339
_ ← * <~ apis.stripe.authorizeRefund(id, amount, RefundReason .RequestedByCustomer )
340
- ccPayment = ReturnCcPayment (
340
+ ccPayment = ReturnStripePayment (
341
341
returnPaymentId = payment.id,
342
342
chargeId = id,
343
343
returnId = payment.returnId,
344
344
amount = amount,
345
345
currency = payment.currency
346
346
)
347
- created ← * <~ ReturnCcPayments .create(ccPayment)
347
+ created ← * <~ ReturnStripePayments .create(ccPayment)
348
348
} yield created).tupled
349
- .andThen(_.runTxn()) // we want to run each stripe refund in separate transaction to avoid any rollback of `ReturnCcPayments ` table
349
+ .andThen(_.runTxn()) // we want to run each stripe refund in separate transaction to avoid any rollback of `ReturnStripePayments ` table
350
350
351
351
/** Splits total refund amount into order cc charges.
352
352
*
@@ -377,7 +377,7 @@ object ReturnPaymentManager {
377
377
for {
378
378
previousCcRefunds ← * <~ Returns
379
379
.findPreviousOrCurrent(rma)
380
- .join(ReturnCcPayments )
380
+ .join(ReturnStripePayments )
381
381
.on(_.id === _.returnId)
382
382
.map { case (_, ccPayment) ⇒ ccPayment.chargeId → ccPayment.amount }
383
383
.groupBy(_._1)
0 commit comments