Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Fully working GPay/ApplePay implementation #157

Closed
wants to merge 1 commit into from

Conversation

VladTer22
Copy link

No description provided.

Copy link
Contributor

@pmusaraj pmusaraj left a comment

Choose a reason for hiding this comment

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

How does this work without any server-side changes? Does it just show the buttons and then Stripe handles payment processing through a different channel?

We would also need to see some tests here prior to considering a merge.

.filterBy("id", this.selectedPlan)
.get("firstObject");
console.log("plan")
console.log(plan)
Copy link
Contributor

Choose a reason for hiding this comment

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

Noticing a lot of console.logs in this PR.

const elements = this.stripe.elements();
const paymentRequest = this.stripe.paymentRequest({
currency: "usd",
country: "US",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should country and currency be hardcoded?

@@ -44,6 +44,18 @@
class="btn btn-primary btn-payment"
label="discourse_subscriptions.plans.payment_button"
}}

{{subscribe-payments
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you provide a screenshot of what this would look like?

@@ -345,6 +1197,13 @@
"@glimmer/env" "^0.1.7"
"@glimmer/global-context" "0.83.1"

"@google-pay/button-element@^3.0.6":
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this being used in the plugin markup?

@VladTer22
Copy link
Author

image.png

Yes, it was determined that the best way to work was directly through the stripe. Depending on what exactly the user's device supports, he sees the possibility of payment via GPay or Apple Pay.
If customer device didn't support this payments - he see Link payment button.

@pmusaraj
Copy link
Contributor

@blake-discourse can you make a decision on this PR please?

@blake-discourse
Copy link
Contributor

I'm not against adding more payment option support to the checkout form, but we now support Stripe Checkout with pricing tables, and Google Pay can be enabled that way with no change to the plugin. Let's go with that route for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants