-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add check masterpass user endpoint (#68)
- Loading branch information
1 parent
ece3f25
commit 6f19f8e
Showing
4 changed files
with
38 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const Craftgate = require('../../dist'); | ||
|
||
const craftgate = new Craftgate.Client({ | ||
apiKey: 'api-key', | ||
secretKey: 'secret-key', | ||
baseUrl: 'https://sandbox-api.craftgate.io' | ||
}); | ||
|
||
const request = { | ||
masterpassGsmNumber: '903000000000' | ||
}; | ||
|
||
craftgate.payment().checkMasterpassUser(request) | ||
.then(results => console.info('Check masterpass user response', results)) | ||
.catch(err => console.error('Failed to check masterpass user', err)); |
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,5 @@ | ||
type CheckMasterpassUserRequest = { | ||
masterpassGsmNumber: string | ||
}; | ||
|
||
export default CheckMasterpassUserRequest; |
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,12 @@ | ||
type CheckMasterpassUserResponse = { | ||
isEligibleToUseMasterpass: boolean; | ||
isAnyCardSavedInCustomerProgram: boolean; | ||
hasMasterpassAccount: boolean; | ||
hashAnyCardSavedInMasterpassAccount: boolean; | ||
isMasterpassAccountLinkedWithMerchant: boolean; | ||
isMasterpassAccountLocked: boolean; | ||
isPhoneNumberUpdatedInAnotherMerchant: boolean; | ||
accountStatus: string; | ||
}; | ||
|
||
export default CheckMasterpassUserResponse; |