#hoangminh-google-pay
1 messages · Page 1 of 1 (latest)
This is what I have:
`this._paymentRequest = this._stripe.paymentRequest({
country: paymentWalletRequest.country,
currency: paymentWalletRequest.currency,
total: {
label: paymentWalletRequest.total.label,
amount: paymentWalletRequest.total.amount,
pending: paymentWalletRequest.total.pending
},
requestPayerName: paymentWalletRequest.requestPayerName,
requestPayerEmail: paymentWalletRequest.requestPayerEmail,
disableWallets: paymentWalletRequest.disableWallets
});`
and the paymentWalletRequest object is defined like this:
`const test = new PaymentWalletRequest();
test.country = "US";
test.currency = "usd";
test.total = new PaymentItem();
test.total.amount = resp.subscriptionCost;
test.total.label = "This is a test product";
test.total.pending = false; // see how it behaves
test.requestPayerEmail = true;
test.requestPayerName = true;
test.disableWallets = ["browserCard"];`
When you press continue, what screen do you see?
This is what displays after clicking continue
Yeah, so if you press the "i" icon you should see the label reflected there, right?
ah I see
one more question, if I want to offer a discount to customer
for ex: if customer enter a discount code on my website, they would get a discount. So in the browser payment, we would like to show the full price and the discount price, then the total price that we are going to charge them
Is it possible to do it with payment intent object ?
Unfortunately PaymentIntents don't have the concept of a discount so I don't think we can do it with just that
I am not completely familiar with the PaymentRequest button but this may be possible to show with DisplayItems https://stripe.com/docs/js/payment_request/create#stripe_payment_request-options-displayItems
Complete reference documentation for the Stripe JavaScript SDK.
Thanks. I'll look into that
@dim quarry are you unblocked?
No, I'm still having hard time to display the price along with the coupon
What is blocking you here?