Skip to content

Commit

Permalink
Removes identity number field on onboarding flow
Browse files Browse the repository at this point in the history
  • Loading branch information
semihshn committed Mar 29, 2024
1 parent 9ce0dd0 commit 1b6e9a0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 52 deletions.
62 changes: 16 additions & 46 deletions adapter/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,9 @@ const (

// pos apm payment provider declaration
const (
PosApmPaymentProvider_YKB_WORLD_PAY PosApmPaymentProvider = "YKB_WORLD_PAY"
PosApmPaymentProvider_YKB_WORLD_PAY_SHOPPING_LOAN PosApmPaymentProvider = "YKB_WORLD_PAY_SHOPPING_LOAN"
PosApmPaymentProvider_GOOGLEPAY PosApmPaymentProvider = "GOOGLEPAY"
PosApmPaymentProvider_GARANTI_PAY PosApmPaymentProvider = "GARANTI_PAY"
PosApmPaymentProvider_YKB_WORLD_PAY PosApmPaymentProvider = "YKB_WORLD_PAY"
PosApmPaymentProvider_APPLEPAY PosApmPaymentProvider = "APPLEPAY"
PosApmPaymentProvider_GOOGLEPAY PosApmPaymentProvider = "GOOGLEPAY"
)

// payment status declaration
Expand Down Expand Up @@ -559,11 +558,6 @@ const (
ClientType_M ClientType = "M"
)

// tokenized card type declaration
const (
TokenizedCardType_APPLE_PAY TokenizedCardType = "APPLE_PAY"
)

// requests
type CreatePaymentRequest struct {
Price float64 `json:"price,omitempty"`
Expand Down Expand Up @@ -791,13 +785,6 @@ type UpdateStoredCardRequest struct {
ExpireMonth string `json:"expireMonth,omitempty"`
}

type CloneStoredCardRequest struct {
SourceCardUserKey string `json:"sourceCardUserKey"`
SourceCardToken string `json:"sourceCardToken"`
TargetCardUserKey string `json:"targetCardUserKey,omitempty"`
TargetMerchantId int64 `json:"targetMerchantId"`
}

type DeleteStoredCardRequest struct {
CardUserKey string `json:"cardUserKey,omitempty"`
CardToken string `json:"cardToken,omitempty"`
Expand Down Expand Up @@ -838,14 +825,6 @@ type StoreCardRequest struct {
CardUserKey string `json:"cardUserKey,omitempty"`
}

type ApplePayMerchantSessionCreateRequest struct {
MerchantIdentifier string `json:"merchantIdentifier,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Initiative string `json:"initiative,omitempty"`
InitiativeContext string `json:"initiativeContext,omitempty"`
ValidationUrl string `json:"validationUrl,omitempty"`
}

type CheckMasterpassUserRequest struct {
MasterpassGsmNumber string `json:"masterpassGsmNumber"`
}
Expand Down Expand Up @@ -1378,7 +1357,6 @@ type CreateMemberRequest struct {
Address string `json:"address,omitempty"`
Email string `json:"email,omitempty"`
PhoneNumber string `json:"phoneNumber,omitempty"`
IdentityNumber string `json:"identityNumber,omitempty"`
ContactName string `json:"contactName,omitempty"`
ContactSurname string `json:"contactSurname,omitempty"`
MemberType MemberType `json:"memberType,omitempty"`
Expand All @@ -1397,7 +1375,6 @@ type UpdateMemberRequest struct {
Address string `json:"address,omitempty"`
Email string `json:"email,omitempty"`
PhoneNumber string `json:"phoneNumber,omitempty"`
IdentityNumber string `json:"identityNumber,omitempty"`
ContactName string `json:"contactName,omitempty"`
ContactSurname string `json:"contactSurname,omitempty"`
MemberType MemberType `json:"memberType,omitempty"`
Expand Down Expand Up @@ -1435,7 +1412,6 @@ type MemberResponse struct {
Email *string `json:"email"`
Address *string `json:"address"`
PhoneNumber *string `json:"phoneNumber"`
IdentityNumber *string `json:"identityNumber"`
ContactName *string `json:"contactName"`
ContactSurname *string `json:"contactSurname"`
LegalCompanyTitle *string `json:"legalCompanyTitle"`
Expand Down Expand Up @@ -1942,26 +1918,20 @@ type Loyalty struct {
Message *string `json:"message,omitempty"`
}

type TokenizedCard struct {
TokenizedCardType TokenizedCardType `json:"type,omitempty"`
Data map[string]interface{} `json:"data,omitempty"`
}

type Card struct {
CardHolderName string `json:"cardHolderName,omitempty"`
CardNumber string `json:"cardNumber,omitempty"`
ExpireYear string `json:"expireYear,omitempty"`
ExpireMonth string `json:"expireMonth,omitempty"`
Cvc string `json:"cvc,omitempty"`
CardAlias string `json:"cardAlias,omitempty"`
CardUserKey string `json:"cardUserKey,omitempty"`
CardToken string `json:"cardToken,omitempty"`
BinNumber string `json:"binNumber,omitempty"`
LastFourDigits string `json:"lastFourDigits,omitempty"`
CardHolderIdentityNumber string `json:"cardHolderIdentityNumber,omitempty"`
Loyalty *Loyalty `json:"loyalty,omitempty"`
StoreCardAfterSuccessPayment bool `json:"storeCardAfterSuccessPayment,omitempty"`
TokenizedCard *TokenizedCard `json:"tokenizedCard,omitempty"`
CardHolderName string `json:"cardHolderName,omitempty"`
CardNumber string `json:"cardNumber,omitempty"`
ExpireYear string `json:"expireYear,omitempty"`
ExpireMonth string `json:"expireMonth,omitempty"`
Cvc string `json:"cvc,omitempty"`
CardAlias string `json:"cardAlias,omitempty"`
CardUserKey string `json:"cardUserKey,omitempty"`
CardToken string `json:"cardToken,omitempty"`
BinNumber string `json:"binNumber,omitempty"`
LastFourDigits string `json:"lastFourDigits,omitempty"`
CardHolderIdentityNumber string `json:"cardHolderIdentityNumber,omitempty"`
Loyalty *Loyalty `json:"loyalty,omitempty"`
StoreCardAfterSuccessPayment bool `json:"storeCardAfterSuccessPayment,omitempty"`
}

type FraudCheckParameters struct {
Expand Down
9 changes: 3 additions & 6 deletions tests/onboarding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package tests
import (
"context"
"fmt"
"testing"
"time"

"github.com/craftgate/craftgate-go-client/adapter"
craftgate "github.com/craftgate/craftgate-go-client/adapter"
"github.com/davecgh/go-spew/spew"
"testing"
"time"
)

var onboardingClient, _ = craftgate.New("api-key", "secret-key", "https://sandbox-api.craftgate.io")
Expand Down Expand Up @@ -41,7 +42,6 @@ func Test_CreateSubMerchantMember(t *testing.T) {
Email: "[email protected]",
PhoneNumber: "905551111111",
Iban: "TR930006701000000001111111",
IdentityNumber: "11111111110",
LegalCompanyTitle: "Dem Zeytinyağı Üretim Ltd. Şti.",
Name: "Dem Zeytinyağı Üretim Ltd. Şti.",
MemberType: craftgate.MemberType_LIMITED_OR_JOINT_STOCK_COMPANY,
Expand All @@ -68,7 +68,6 @@ func Test_CreateBuyerAndSubMerchantMember(t *testing.T) {
Email: "[email protected]",
PhoneNumber: "905551111111",
Iban: "TR930006701000000001111111",
IdentityNumber: "11111111110",
LegalCompanyTitle: "Dem Zeytinyağı Üretim Ltd. Şti.",
Name: "Dem Zeytinyağı Üretim Ltd. Şti.",
MemberType: craftgate.MemberType_LIMITED_OR_JOINT_STOCK_COMPANY,
Expand All @@ -94,7 +93,6 @@ func Test_UpdateSubMerchantMember(t *testing.T) {
Email: "[email protected]",
PhoneNumber: "905551111111",
Iban: "TR930006701000000001111111",
IdentityNumber: "11111111110",
LegalCompanyTitle: "Dem Zeytinyağı Üretim Ltd. Şti.",
Name: "Dem Zeytinyağı Üretim Ltd. Şti.",
MemberType: craftgate.MemberType_LIMITED_OR_JOINT_STOCK_COMPANY,
Expand All @@ -121,7 +119,6 @@ func Test_UpdateBuyerMember(t *testing.T) {
Email: "[email protected]",
PhoneNumber: "905551111111",
Iban: "TR930006701000000001111111",
IdentityNumber: "11111111110",
LegalCompanyTitle: "Dem Zeytinyağı Üretim Ltd. Şti.",
Name: "Dem Zeytinyağı Üretim Ltd. Şti.",
MemberType: craftgate.MemberType_PERSONAL,
Expand Down

0 comments on commit 1b6e9a0

Please sign in to comment.