Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In LocalPayment workflow , How can I get paymentId in the latest SDK 5.2.0? #1207

Open
Jake-Jiang opened this issue Nov 13, 2024 · 3 comments

Comments

@Jake-Jiang
Copy link

Is your feature request related to a problem? Please describe.

LocalPaymentAuthRequestParams. paymentId can only be accessed from within the same library group (referenced groupId=com. braintreepayments. api

Describe the solution you'd like.

No response

@warmkesselj
Copy link
Contributor

Hey @Jake-Jiang this is a private property. I'm curious what you'd be needing the paymentId for?

@Jake-Jiang
Copy link
Author

On sdk 4.x, We can get the paymentId easily.
localPaymentClient.startPayment(request, (result, error) -> { // do any preprocessing result.getPaymentId() localPaymentClient.approvePayment(MyActivity.this, result); }); }

we need send paymentId to our server.

According to your official document :https://developer.paypal.com/braintree/docs/guides/local-payment-methods/server-side/ruby#local-payment-method-webhooks

Braintree recommends that you store the payment_id returned to your client when starting the payment, and map it to a shopping cart identifier or some other form of identifier. When this webhook is received by your server, you can then look up the pending order using the included payment_id.

I see the latest iOS SDK also can get the paymentId

`// MARK: - BTLocalPaymentRequestDelegate Conformance

extension IdealViewController: BTLocalPaymentRequestDelegate {

func localPaymentStarted(
    _ request: BraintreeLocalPayment.BTLocalPaymentRequest,
    paymentID: String,
    start: @escaping () -> Void
) {
    paymentIDLabel.text = "LocalPayment ID: \(paymentID)"
    start()
}

}`

This issue block our sdk upgrade plan.

@warmkesselj
Copy link
Contributor

@Jake-Jiang we have created a story for this issue and will follow up with it.

@saperi22 saperi22 mentioned this issue Nov 20, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants