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

Received both the Error and the Complete delegate events simultaneously #276

Open
citcon-aoyansheng opened this issue May 31, 2024 · 7 comments

Comments

@citcon-aoyansheng
Copy link

citcon-aoyansheng commented May 31, 2024

PayPal SDK Version

1.3.2

Environment

Sandbox

Xcode Version

Xcode 15.3

OS Version & Device

iPhone 13 iOs 17.4.1

Integration type

Swfit Package Manager

Development Processor

Apple Silicon (M-series chips)

Describe the bug

In the Demo APP, when selecting the Native checkout mode and replacing the Client ID with my own account's ID (without modifying the Order ID), I observed the following:

  1. received an error delegate callback.
    image

  2. then the app shows a payment page, click the complete
    IMG_0053

  3. at last receive a complete callback
    image

  4. I consistently encountered this screen when I replaced the order ID with my own. A 'Review Order' button is at the bottom but not a 'Complete Order' button. When I clicked it, the popup just disappeared.

actual
IMG_0055

expect
IMG_0053 2

To reproduce

My client id: AYxfFTQHBFPxhM7zzo2oJSImcDVfL-kn5zv6vbQBeW5MBQxNgYECVkpVmLUvFWsjRt8c_Oxa2-OPkFr_

Expected behavior

If an error callback is received, the flow should be stopped and not proceed with the payment.

Screenshots

No response

@citcon-aoyansheng
Copy link
Author

Is this SDK in a stable release or beta/preview version?

@KunJeongPark
Copy link
Collaborator

KunJeongPark commented Jun 2, 2024

Thank you for your interest in our SDK.
The demo app uses hard coded clientID and sandbox merchant credentials in our test merchant server.

If you hard code another clientID, the demo app will not work properly.

@citcon-aoyansheng
Copy link
Author

@KunJeongPark Thanks. Regarding the issue described in the fourth scenario above, when I used my Client ID and Order ID, the 'Review Order' is on the screen instead of the 'Complete Order'. Please help me understand what might be the problem in this case.

@KunJeongPark
Copy link
Collaborator

I'm not sure but it is not a flow that is supported by the demo app, modifying the demo app to include a different client ID.

@citcon-aoyansheng
Copy link
Author

The same thing happened when I integrated the SDK separately in my app. It also shows the 'Review order'

@KunJeongPark
Copy link
Collaborator

KunJeongPark commented Jun 3, 2024

It is the same with your own app, you need server side integration. ClientID is only for use in the SDK.

It looks like you are using PayPalCheckoutSDK which is wrapped in our PayPalNativeCheckout module and that SDK along with the PayPalNativeCheckout module is being deprecated. We are only addressing existing merchants' critical security bugs for that module. We are directing our merchants to use PayPalWebPayments.

@citcon-aoyansheng
Copy link
Author

citcon-aoyansheng commented Jun 4, 2024

Currently, I have not used the backend server. I created the order using the Client ID and Secret in the Postman and obtained the Order ID. Then set the Client ID and Order ID in the demo app, which is when the problem occurred. Even if I use PayPalWebPayments, it's the same.
IMG_0056

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