|
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>methodNamedfn> attribute |
| 3830 | + h2> |
| 3831 | + <p data-link-for="MerchantValidationEventInit"> |
| 3832 | + When getting, returns the value it was initialized with. See |
| 3833 | + <a>methodNamea> member of <a>MerchantValidationEventInita> for |
| 3834 | + more information. |
| 3835 | + p> |
| 3836 | + section> |
3826 | 3837 | <section>
|
3827 | 3838 | <h3>
|
3828 | 3839 | <dfn data-lt=
|
|
3842 | 3853 | settings objecta>’s <a data-cite=
|
3843 | 3854 | "!html/multipage/webappapis.html#api-base-url">API base URLa>.
|
3844 | 3855 | li>
|
3845 |
| - <li>Let <var>inputvar> be the empty string. |
3846 |
| - li> |
3847 |
| - <li>If <var>eventInitDictvar> was passed, set <var>inputvar> to |
3848 |
| - the value of <var>eventInitDictvar>["<a>validationURLa>"]. |
3849 |
| - li> |
3850 | 3856 | <li data-link-for="MerchantValidationEventInit">Let
|
3851 | 3857 | <var>validationURLvar> be the result of <a data-cite=
|
3852 |
| - "!url#concept-url-parser">URL parsinga> <var>inputvar> and |
| 3858 | + "!url#concept-url-parser">URL parsinga> |
| 3859 | + <var>eventInitDictvar>["<a>validationURLa>"] and |
3853 | 3860 | <var>basevar>.
|
3854 | 3861 | li>
|
3855 | 3862 | <li>If <var>validationURLvar> is failure, throw a
|
|
3858 | 3865 | <li>Initialize <var>eventvar>.<a>validationURLa> attribute to
|
3859 | 3866 | <var>validationURLvar>.
|
3860 | 3867 | li>
|
| 3868 | + <li>If <var>eventInitDictvar>["<a>methodNamea>"] 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 identifiera> with |
| 3872 | + <var>eventInitDictvar>["<a>methodNamea>"]. If it returns false, |
| 3873 | + then throw a <a>RangeErrora> exception. Optionally, inform the |
| 3874 | + developer that the payment method identifier is invalid. |
| 3875 | + li> |
| 3876 | + <li>Initialize <var>eventvar>.<a>methodNamea> attribute to |
| 3877 | + <var>eventInitDictvar>["<a>methodNamea>"]. |
| 3878 | + li> |
3861 | 3879 | <li>Initialize <var>eventvar>.<a data-lt=
|
3862 | 3880 | "mechvalidation.waitForUpdate">[[\waitForUpdate]]a> to false.
|
3863 | 3881 | li>
|
|
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>methodNamedfn> member |
| 3984 | + dt> |
| 3985 | + <dd> |
| 3986 | + A <a>payment method identifiera> representing the <a>payment |
| 3987 | + handlera> that is requiring <a>merchant validationa>. |
| 3988 | + dd> |
| 3989 | + <dt> |
3964 | 3990 | <dfn>validationURLdfn> member
|
3965 |
| - h4> |
3966 |
| - <p> |
| 3991 | + dt> |
| 3992 | + <dd> |
3967 | 3993 | A URL from which a developer would fetch <a>payment
|
3968 | 3994 | handlera>-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 | 4044 | <dfn>methodNamedfn> member
|
4019 | 4045 | dt>
|
4020 | 4046 | <dd>
|
4021 |
| - A DOMString representing the <a>payment method identifiera>. |
| 4047 | + A string representing the <a>payment method identifiera>. |
4022 | 4048 | dd>
|
4023 | 4049 | <dt>
|
4024 | 4050 | <dfn>methodDetailsdfn> member
|
|
4253 | 4279 | developer can fetch <a>payment handlera>-specific verification
|
4254 | 4280 | data.
|
4255 | 4281 | li>
|
| 4282 | + <li>Let <var>methodNamevar> be the <a>payment method identifiera> |
| 4283 | + for the <a>payment handlera> that is requiring <a>merchant |
| 4284 | + validationa>. |
| 4285 | + li> |
4256 | 4286 | <li>
|
4257 | 4287 | <a>Queue a taska> on the <a>user interaction task sourcea> to
|
4258 | 4288 | run the following steps:
|
4259 |
| - <ol> |
| 4289 | + <ol data-link-for="MerchantValidationEventInit"> |
4260 | 4290 | <li>Assert: <var>requestvar>.<a>[[\updating]]a> is false.
|
4261 | 4291 | li>
|
4262 | 4292 | <li>Assert: <var>requestvar>.<a>[[\state]]a> is
|
|
4265 | 4295 | <li>Let <var>eventInitDictvar> be an new
|
4266 | 4296 | <a>MerchantValidationEventInita> dictionary.
|
4267 | 4297 | li>
|
4268 |
| - <li data-link-for="MerchantValidationEventInit">Set |
4269 |
| - <var>eventInitDictvar>["<a>validationURLa>"] to |
4270 |
| - <var>validationURLvar>. |
| 4298 | + <li>Set <var>eventInitDictvar>["<a>validationURLa>"] to <var> |
| 4299 | + validationURLvar>. |
| 4300 | + li> |
| 4301 | + <li>Set <var>eventInitDictvar>["<a>methodNamea>"] to |
| 4302 | + <var>methodNamevar>. |
4271 | 4303 | li>
|
4272 | 4304 | <li>Let <var>eventvar> be the result of <a data-cite=
|
4273 | 4305 | "dom#concept-event-constructor">constructinga> a
|
|
0 commit comments