-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added Klarna as a one click widget
- Loading branch information
1 parent
68bf927
commit 6bbd72d
Showing
21 changed files
with
361 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
type token = {client_token: string} | ||
type collected_shipping_address = { | ||
city: string, | ||
country: string, | ||
email: string, | ||
family_name: string, | ||
given_name: string, | ||
phone: string, | ||
postal_code: string, | ||
region: string, | ||
street_address: string, | ||
} | ||
let defaultCollectedShippingAddress = { | ||
city: "", | ||
country: "", | ||
email: "", | ||
family_name: "", | ||
given_name: "", | ||
phone: "", | ||
postal_code: "", | ||
region: "", | ||
street_address: "", | ||
} | ||
|
||
type res = { | ||
approved: bool, | ||
show_form: bool, | ||
authorization_token: string, | ||
finalize_required: bool, | ||
collected_shipping_address?: collected_shipping_address, | ||
} | ||
type authorizeAttributes = {collect_shipping_address: bool} | ||
type authorize = (authorizeAttributes, JSON.t, res => unit) => unit | ||
type loadType = { | ||
container?: string, | ||
color_text?: string, | ||
payment_method_category?: string, | ||
theme?: string, | ||
shape?: string, | ||
on_click?: authorize => Promise.t<unit>, | ||
} | ||
type some = { | ||
init: token => unit, | ||
load: (loadType, JSON.t => unit) => unit, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.