-1

For the Google pay payments in my application, I was using @google-pay/button-angular in angular

The HTML code is: <google-pay - button[environment]="current_env"[buttonColor] = "buttonColor"[buttonType] = "buttonType"

    [buttonSizeMode] = "isCustomSize ? 'fill' : 'static'"[paymentRequest] = "paymentRequest"

    (loadpaymentdata) = "onLoadPaymentData($event)" >

In TS file the code was,

current_env: String = environment.production != true ? "TEST" : "PRODUCTION";

buttonColor: String = "black";

buttonType: String = "pay";

isCustomSize = false;

Earlier it was working fine.

Today I observed that Google Pay button is showing for the element. The error is attached.enter image description here

2 Answers 2

0

While fixing, I found that 'pay' is not working in 'buttonType' option. So, I changed it to

buttonType: String = "short";

Now it is working fine, for more details, please refer https://www.npmjs.com/package/@google-pay/button-angular

Sign up to request clarification or add additional context in comments.

Comments

0

There are multiple types not working on Google's own implementation docs so I assume this is a Google bug.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.