Skip to content

Conversation

hamzanasir
Copy link
Contributor

This PR aims to add an example for creating and processing a one-time google pay transaction with the v6 PayPal SDK and the google pay SDK.

@hamzanasir hamzanasir requested a review from a team as a code owner July 18, 2025 20:13
@gregjopa
Copy link
Contributor

@hamzanasir can you run prettier locally? Looks like CI is failing because of code formatting.

@hamzanasir
Copy link
Contributor Author

@gregjopa Thanks for calling that out! I think my editor wasn't auto-formatting because we don't have a .prettierrc file in the repo. I added an empty one for now since I think this is an issue other's have run into as well.

@gregjopa
Copy link
Contributor

@gregjopa Thanks for calling that out! I think my editor wasn't auto-formatting because we don't have a .prettierrc file in the repo. I added an empty one for now since I think this is an issue other's have run into as well.

Thanks @hamzanasir. I like adding a default .prettierrc file to root of the project to tell editors to use the default prettier settings when formatting on save. Great improvement.

googlePaySession,
) {
try {
const orderPayload = getPayPalOrder(purchaseAmount);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can we name this getPayPalOrderPayload to help clarify that its not doing an ORDER GET operation with the API?

Suggested change
const orderPayload = getPayPalOrder(purchaseAmount);
const orderPayload = getPayPalOrderPayload(purchaseAmount);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another great suggestion. I think that's an important clarification to make 🙂

Copy link
Contributor

@gregjopa gregjopa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work @hamzanasir! I left some minor comments about function names.

Copy link
Contributor

@EvanReinstein EvanReinstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@hamzanasir hamzanasir merged commit f37c67e into main Jul 22, 2025
1 check passed
@gregjopa gregjopa deleted the feature/add-google-pay-example branch July 24, 2025 14:34
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

Successfully merging this pull request may close these issues.

4 participants