Skip to content

Commit

Permalink
to fix scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fupelaqu committed Jul 31, 2024
1 parent ebaec7e commit 420ad93
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ trait StripePayInApi extends PayInApi { _: StripeContext =>

payInTransaction.ipAddress match {
case Some(ipAddress) =>

var onlineParams =
PaymentIntentCreateParams.MandateData.CustomerAcceptance.Online
.builder()
Expand All @@ -246,17 +245,17 @@ trait StripePayInApi extends PayInApi { _: StripeContext =>

params
.setMandateData(
PaymentIntentCreateParams.MandateData
.builder()
.setCustomerAcceptance(
PaymentIntentCreateParams.MandateData.CustomerAcceptance
.builder()
.setAcceptedAt((System.currentTimeMillis() / 1000).toInt)
.setOnline(onlineParams.build())
.build()
)
.build()
)
PaymentIntentCreateParams.MandateData
.builder()
.setCustomerAcceptance(
PaymentIntentCreateParams.MandateData.CustomerAcceptance
.builder()
.setAcceptedAt((System.currentTimeMillis() / 1000).toInt)
.setOnline(onlineParams.build())
.build()
)
.build()
)

case _ =>

Expand Down Expand Up @@ -402,7 +401,6 @@ trait StripePayInApi extends PayInApi { _: StripeContext =>

payInTransaction.ipAddress match {
case Some(ipAddress) =>

var onlineParams =
PaymentIntentCreateParams.MandateData.CustomerAcceptance.Online
.builder()
Expand Down Expand Up @@ -494,14 +492,14 @@ trait StripePayInApi extends PayInApi { _: StripeContext =>
returnUrl = Option(payment.getNextAction.getRedirectToUrl.getReturnUrl)
)
} else if (status == "requires_payment_method" || status == "requires_confirmation") {
transaction = transaction.copy(
status = Transaction.TransactionStatus.TRANSACTION_PENDING_PAYMENT,
paymentClientSecret = Option(payment.getClientSecret),
paymentClientReturnUrl = Option(
s"${config.payInReturnUrl}/${payInTransaction.orderUuid}?transactionIdParameter=payment_intent&registerCard=false&printReceipt=${payInTransaction.printReceipt
.getOrElse(false)}&payment_intent=${payment.getId}"
)
transaction = transaction.copy(
status = Transaction.TransactionStatus.TRANSACTION_PENDING_PAYMENT,
paymentClientSecret = Option(payment.getClientSecret),
paymentClientReturnUrl = Option(
s"${config.payInReturnUrl}/${payInTransaction.orderUuid}?transactionIdParameter=payment_intent&registerCard=false&printReceipt=${payInTransaction.printReceipt
.getOrElse(false)}&payment_intent=${payment.getId}"
)
)
} else if (status == "succeeded" || status == "requires_capture") {
transaction =
transaction.copy(status = Transaction.TransactionStatus.TRANSACTION_SUCCEEDED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,7 @@ trait StripePaymentServiceSpec[SD <: SessionData with SessionDataDecorator[SD]]
payInTransactionId = result.transactionId
assert(result.transactionStatus.isTransactionSucceeded)
}*/
}
else if(status == StatusCodes.Accepted){
} else if (status == StatusCodes.Accepted) {
val redirection = responseAs[PaymentRedirection].redirectUrl
log.info(redirection)

Expand Down Expand Up @@ -698,8 +697,7 @@ trait StripePaymentServiceSpec[SD <: SessionData with SessionDataDecorator[SD]]
assert(result.transactionStatus.isTransactionSucceeded)
}
}
}
else{
} else {
fail(s"Unexpected status -> $status")
}
}
Expand Down

0 comments on commit 420ad93

Please sign in to comment.