-
Notifications
You must be signed in to change notification settings - Fork 219
Add documentation for registerPaymentMethodExtensionCallbacks #4834
Add documentation for registerPaymentMethodExtensionCallbacks #4834
Conversation
The previous type was CanMakePaymentCallback, used for the payment methods's own canMakePayment callbacks, which could also return Promises. In order to eliminate the confusion, a new type has been created that defines callbacks that only return true or false.
Size Change: 0 B Total Size: 1.23 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great Raluca, beside one typo I made a suggestion for.
I was wondering, could you maybe add a line specifying how you would know what key you have to use in the callbacks
object? Maybe like 'This is the value of the $name
property used when registering this payment method with the Blocks API'. Feel free to ignore this if you don't think it adds value.
Co-authored-by: Thomas Roberts <[email protected]>
This is a really good suggestion and I've implemented it in d01b874 |
This PR adds documentation for the
registerPaymentMethodExtensionCallbacks
introduced in #4621Fixes #4623
It also improves the type for callbacks registered by extensions in commit 86f74af: the previous type was CanMakePaymentCallback, used for the payment methods's own
canMakePayment
configuration parameter, that returned true || a Promise. In order to eliminate the confusion, a new type has been created to define the extension callbacks that only return true or false.Changelog