@@ -102,9 +102,9 @@ <h4 class="text-center my-0">Google & Apple Pay Demo</h4>
102
102
</ div >
103
103
< div class ="google-pay-support ">
104
104
< div class ="col-0 ">
105
- < button id ="google-pay " class ="btn btn-light border px-5 " type ="button ">
105
+ <!--< button id="google-pay" class="btn btn-light border px-5" type="button">
106
106
<img src="https://upload.wikimedia.org/wikipedia/commons/b/b5/Google_Pay_%28GPay%29_Logo.svg" style="width:2rem"/>
107
- </ button >
107
+ </button>-->
108
108
</ div >
109
109
</ div >
110
110
< div class ="apple-pay-support col row align-items-center ">
@@ -169,11 +169,20 @@ <h5 class="modal-title">Your Payment Was Successful!</h5>
169
169
< script src ="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js " integrity ="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q " crossorigin ="anonymous "> </ script >
170
170
< script src ="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js " integrity ="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl " crossorigin ="anonymous "> </ script >
171
171
< script src ="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/prism.min.js " integrity ="sha256-3teItwIfMuVB74Alnxw/y5HAZ2irOsCULFff3EgbtEs= " crossorigin ="anonymous "> </ script >
172
+ < script
173
+ src ="https://pay.google.com/gp/p/js/pay.js ">
174
+ </ script >
172
175
< script src ="https://payload.co/Payload.js "> </ script >
173
176
174
177
< script >
175
178
Payload ( 'test_client_key_3bcr16ohAy8aEcwK3Vffs' )
176
179
180
+ const paymentsClient = new google . payments . api . PaymentsClient ( { environment : 'TEST' } ) ;
181
+ const button = paymentsClient . createButton ( { onClick : ( ) => console . log ( 'TODO: click handler' ) } ) ;
182
+ button . setAttribute ( 'id' , 'google-pay' )
183
+
184
+ $ ( '.google-pay-support div' ) . append ( button )
185
+
177
186
var checkout_form = new Payload . Form ( {
178
187
form : $ ( '#checkout-form' ) . get ( 0 ) ,
179
188
styles : { invalid : 'is-invalid' } ,
0 commit comments