#hoangminh-google-pay

1 messages · Page 1 of 1 (latest)

subtle sinew
#

Hello! What's the code you used to create the Payment Request

dim quarry
#

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"];`
subtle sinew
#

When you press continue, what screen do you see?

dim quarry
#

This is what displays after clicking continue

subtle sinew
#

Yeah, so if you press the "i" icon you should see the label reflected there, right?

dim quarry
#

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 ?

fiery cape
#

Unfortunately PaymentIntents don't have the concept of a discount so I don't think we can do it with just that

dim quarry
#

Thanks. I'll look into that

fast sparrow
#

@dim quarry are you unblocked?

dim quarry
#

No, I'm still having hard time to display the price along with the coupon

fiery cape
#

What is blocking you here?

dim quarry
#

Okie, I've got it working

#

Thank you everyone. Initially, I did not define the amount correctly