Skip to content

Commit

Permalink
Name changes to better differentiate from coming web based payments
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasvettefors committed Jul 1, 2024
1 parent cd63031 commit 0a226b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,13 @@ class PaymentSession(private var orderInfo: ViewPaymentOrderInfo? = null) {
}

/**
* Make a payment attempt with a specific instrument
* Make a native payment attempt with a specific instrument
*
* There needs to be an active payment session before a payment attempt can be made
*
* @param instrument [PaymentAttemptInstrument]
*/
fun makePaymentAttempt(
fun makeNativePaymentAttempt(
instrument: PaymentAttemptInstrument,
) {
currentPaymentOutputModel?.let {
Expand All @@ -402,7 +402,7 @@ class PaymentSession(private var orderInfo: ViewPaymentOrderInfo? = null) {
BeaconService.logEvent(
eventAction = EventAction.SDKMethodInvoked(
method = MethodModel(
name = "makePaymentAttempt",
name = "makeNativePaymentAttempt",
sdk = true,
succeeded = paymentAttemptOperation != null
),
Expand Down Expand Up @@ -558,7 +558,7 @@ class PaymentSession(private var orderInfo: ViewPaymentOrderInfo? = null) {
private fun onPaymentComplete(url: String) {
when (url) {
orderInfo?.completeUrl -> {
_paymentSessionState.value = PaymentSessionState.PaymentComplete
_paymentSessionState.value = PaymentSessionState.PaymentSessionComplete
setStateToIdle()
BeaconService.logEvent(
eventAction = EventAction.SDKCallbackInvoked(
Expand All @@ -573,7 +573,7 @@ class PaymentSession(private var orderInfo: ViewPaymentOrderInfo? = null) {
}

orderInfo?.cancelUrl -> {
_paymentSessionState.value = PaymentSessionState.PaymentCanceled
_paymentSessionState.value = PaymentSessionState.PaymentSessionCanceled
setStateToIdle()

BeaconService.logEvent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ sealed class PaymentSessionState {
object Dismiss3dSecureFragment : PaymentSessionState()

/**
* Called when payment fragment is created and can be shown
* Called when payment fragment has been created and can be shown
*/
class PaymentFragmentCreated(val fragment: Fragment) : PaymentSessionState()

/**
* Called whenever the payment has been completed
* Called whenever the payment session has been completed
*/
object PaymentComplete : PaymentSessionState()
object PaymentSessionComplete : PaymentSessionState()

/**
* Called whenever the payment has been canceled for any reason
* Called whenever the payment session has been canceled for any reason
*/
object PaymentCanceled : PaymentSessionState()
object PaymentSessionCanceled : PaymentSessionState()

/**
* Called if there is a session problem with performing the payment.
Expand Down

0 comments on commit 0a226b6

Please sign in to comment.