diff --git a/adapter/model.go b/adapter/model.go index 919a608..650a1a1 100644 --- a/adapter/model.go +++ b/adapter/model.go @@ -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 @@ -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"` @@ -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"` @@ -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"` } @@ -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"` @@ -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"` @@ -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"` @@ -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 { diff --git a/tests/onboarding_test.go b/tests/onboarding_test.go index e1bde82..6458faf 100644 --- a/tests/onboarding_test.go +++ b/tests/onboarding_test.go @@ -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") @@ -41,7 +42,6 @@ func Test_CreateSubMerchantMember(t *testing.T) { Email: "haluk.demir@example.com", 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, @@ -68,7 +68,6 @@ func Test_CreateBuyerAndSubMerchantMember(t *testing.T) { Email: "haluk.demir@example.com", 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, @@ -94,7 +93,6 @@ func Test_UpdateSubMerchantMember(t *testing.T) { Email: "haluk.demir@example.com", 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, @@ -121,7 +119,6 @@ func Test_UpdateBuyerMember(t *testing.T) { Email: "haluk.demir@example.com", PhoneNumber: "905551111111", Iban: "TR930006701000000001111111", - IdentityNumber: "11111111110", LegalCompanyTitle: "Dem Zeytinyağı Üretim Ltd. Şti.", Name: "Dem Zeytinyağı Üretim Ltd. Şti.", MemberType: craftgate.MemberType_PERSONAL,