@@ -3819,10 +3819,21 @@ <h2>
3819
3819
[Constructor(DOMString type, optional MerchantValidationEventInit eventInitDict),
3820
3820
SecureContext, Exposed=Window]
3821
3821
interface MerchantValidationEvent : Event {
3822
+ readonly attribute DOMString methodName;
3822
3823
readonly attribute USVString validationURL;
3823
3824
void complete(Promise<any> merchantSessionPromise);
3824
3825
};
3825
3826
</ pre >
3827
+ < section >
3828
+ < h2 >
3829
+ < dfn > methodName</ dfn > attribute
3830
+ </ h2 >
3831
+ < p data-link-for ="MerchantValidationEventInit ">
3832
+ When getting, returns the value it was initialized with. See
3833
+ < a > methodName</ a > member of < a > MerchantValidationEventInit</ a > for
3834
+ more information.
3835
+ </ p >
3836
+ </ section >
3826
3837
< section >
3827
3838
< h3 >
3828
3839
< dfn data-lt =
@@ -3842,14 +3853,10 @@ <h3>
3842
3853
settings object</ a > ’s < a data-cite =
3843
3854
"!html/multipage/webappapis.html#api-base-url "> API base URL</ a > .
3844
3855
</ li >
3845
- < li > Let < var > input</ var > be the empty string.
3846
- </ li >
3847
- < li > If < var > eventInitDict</ var > was passed, set < var > input</ var > to
3848
- the value of < var > eventInitDict</ var > ["< a > validationURL</ a > "].
3849
- </ li >
3850
3856
< li data-link-for ="MerchantValidationEventInit "> Let
3851
3857
< var > validationURL</ var > be the result of < a data-cite =
3852
- "!url#concept-url-parser "> URL parsing</ a > < var > input</ var > and
3858
+ "!url#concept-url-parser "> URL parsing</ a >
3859
+ < var > eventInitDict</ var > ["< a > validationURL</ a > "] and
3853
3860
< var > base</ var > .
3854
3861
</ li >
3855
3862
< li > If < var > validationURL</ var > is failure, throw a
@@ -3858,6 +3865,17 @@ <h3>
3858
3865
< li > Initialize < var > event</ var > .< a > validationURL</ a > attribute to
3859
3866
< var > validationURL</ var > .
3860
3867
</ li >
3868
+ < li > If < var > eventInitDict</ var > ["< a > methodName</ a > "] is not the
3869
+ empty string, run the steps to < a data-cite =
3870
+ "payment-method-id#dfn-validate-a-payment-method-identifier "> validate
3871
+ a payment method identifier</ a > with
3872
+ < var > eventInitDict</ var > ["< a > methodName</ a > "]. If it returns false,
3873
+ then throw a < a > RangeError</ a > exception. Optionally, inform the
3874
+ developer that the payment method identifier is invalid.
3875
+ </ li >
3876
+ < li > Initialize < var > event</ var > .< a > methodName</ a > attribute to
3877
+ < var > eventInitDict</ var > ["< a > methodName</ a > "].
3878
+ </ li >
3861
3879
< li > Initialize < var > event</ var > .< a data-lt =
3862
3880
"mechvalidation.waitForUpdate "> [[\waitForUpdate]]</ a > to false.
3863
3881
</ li >
@@ -3956,18 +3974,26 @@ <h3>
3956
3974
</ h3 >
3957
3975
< pre class ="idl ">
3958
3976
dictionary MerchantValidationEventInit : EventInit {
3977
+ DOMString methodName = "";
3959
3978
USVString validationURL = "";
3960
3979
};
3961
3980
</ pre >
3962
- < section >
3963
- < h4 >
3981
+ < dl >
3982
+ < dt >
3983
+ < dfn > methodName</ dfn > member
3984
+ </ dt >
3985
+ < dd >
3986
+ A < a > payment method identifier</ a > representing the < a > payment
3987
+ handler</ a > that is requiring < a > merchant validation</ a > .
3988
+ </ dd >
3989
+ < dt >
3964
3990
< dfn > validationURL</ dfn > member
3965
- </ h4 >
3966
- < p >
3991
+ </ dt >
3992
+ < dd >
3967
3993
A URL from which a developer would fetch < a > payment
3968
3994
handler</ a > -specific verification data.
3969
- </ p >
3970
- </ section >
3995
+ </ dd >
3996
+ </ dl >
3971
3997
</ section >
3972
3998
</ section >
3973
3999
< section data-dfn-for ="PaymentMethodChangeEvent " data-link-for =
@@ -4018,7 +4044,7 @@ <h3>
4018
4044
< dfn > methodName</ dfn > member
4019
4045
</ dt >
4020
4046
< dd >
4021
- A DOMString representing the < a > payment method identifier</ a > .
4047
+ A string representing the < a > payment method identifier</ a > .
4022
4048
</ dd >
4023
4049
< dt >
4024
4050
< dfn > methodDetails</ dfn > member
@@ -4253,10 +4279,14 @@ <h2>
4253
4279
developer can fetch < a > payment handler</ a > -specific verification
4254
4280
data.
4255
4281
</ li >
4282
+ < li > Let < var > methodName</ var > be the < a > payment method identifier</ a >
4283
+ for the < a > payment handler</ a > that is requiring < a > merchant
4284
+ validation</ a > .
4285
+ </ li >
4256
4286
< li >
4257
4287
< a > Queue a task</ a > on the < a > user interaction task source</ a > to
4258
4288
run the following steps:
4259
- < ol >
4289
+ < ol data-link-for =" MerchantValidationEventInit " >
4260
4290
< li > Assert: < var > request</ var > .< a > [[\updating]]</ a > is false.
4261
4291
</ li >
4262
4292
< li > Assert: < var > request</ var > .< a > [[\state]]</ a > is
@@ -4265,9 +4295,11 @@ <h2>
4265
4295
< li > Let < var > eventInitDict</ var > be an new
4266
4296
< a > MerchantValidationEventInit</ a > dictionary.
4267
4297
</ li >
4268
- < li data-link-for ="MerchantValidationEventInit "> Set
4269
- < var > eventInitDict</ var > ["< a > validationURL</ a > "] to
4270
- < var > validationURL</ var > .
4298
+ < li > Set < var > eventInitDict</ var > ["< a > validationURL</ a > "] to < var >
4299
+ validationURL</ var > .
4300
+ </ li >
4301
+ < li > Set < var > eventInitDict</ var > ["< a > methodName</ a > "] to
4302
+ < var > methodName</ var > .
4271
4303
</ li >
4272
4304
< li > Let < var > event</ var > be the result of < a data-cite =
4273
4305
"dom#concept-event-constructor "> constructing</ a > a
0 commit comments