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

Fully working GPay/ApplePay implementation #157

Open
wants to merge 1 commit into
base: main
Choose a base branch
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants