Skip to content

Commit

Permalink
Expose paymentId (#1220)
Browse files Browse the repository at this point in the history
* remove RestrictTo library scope

* Update CHANGELOG.md

Co-authored-by: Sarah Koop <[email protected]>

---------

Co-authored-by: Sarah Koop <[email protected]>
  • Loading branch information
saperi22 and sarahkoop authored Nov 21, 2024
1 parent 12e3bb0 commit bafeda7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Braintree Android SDK Release Notes

## unreleased

* LocalPayment
* Make LocalPaymentAuthRequestParams public (fixes #1207)

## 5.2.0 (2024-10-30)

* GooglePay
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.braintreepayments.demo;

import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down Expand Up @@ -71,6 +72,11 @@ public void launchIdeal(View v) {
if (paymentAuthRequest instanceof LocalPaymentAuthRequest.ReadyToLaunch) {
LocalPaymentPendingRequest pendingRequest = localPaymentLauncher.launch(requireActivity(),
(LocalPaymentAuthRequest.ReadyToLaunch) paymentAuthRequest);
// merchants have to log paymentId to their servers
Log.i("Sample-server", ((LocalPaymentAuthRequest.ReadyToLaunch) paymentAuthRequest)
.getRequestParams()
.getPaymentId()
);
if (pendingRequest instanceof LocalPaymentPendingRequest.Started) {
storePendingRequest((LocalPaymentPendingRequest.Started) pendingRequest);
} else if (pendingRequest instanceof LocalPaymentPendingRequest.Failure) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import com.braintreepayments.api.BrowserSwitchOptions
* @property approvalUrl used for payment approval.
* @property paymentId of the local payment after creation.
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
data class LocalPaymentAuthRequestParams @JvmOverloads internal constructor(
val request: LocalPaymentRequest,
val approvalUrl: String,
val paymentId: String,
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
var browserSwitchOptions: BrowserSwitchOptions? = null
)

0 comments on commit bafeda7

Please sign in to comment.