Skip to content

Commit

Permalink
chippin-added
Browse files Browse the repository at this point in the history
  • Loading branch information
beratallahverdi committed Sep 30, 2024
1 parent 7a37fd7 commit 00ab2c5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/payment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,35 @@ func TestPayment_InitTompayApmPayment(t *testing.T) {
}
}

func TestPayment_InitChippinApmPayment(t *testing.T) {
request := adapter.InitApmPaymentRequest{
ApmType: craftgate.ApmType_CHIPPIN,
ApmUserIdentity: 1000000, // Chippin Numarası

Check failure on line 576 in tests/payment_test.go

View workflow job for this annotation

GitHub Actions / build

cannot use 1000000 (untyped int constant) as string value in struct literal (typecheck)

Check failure on line 576 in tests/payment_test.go

View workflow job for this annotation

GitHub Actions / build

cannot use 1000000 (untyped int constant) as string value in struct literal (typecheck)
Price: 1,
PaidPrice: 1,
Currency: craftgate.Currency_TRY,
PaymentGroup: craftgate.PaymentGroup_LISTING_OR_SUBSCRIPTION,
ConversationId: "foo-bar",
CallbackUrl: "https://www.your-website.com/callback",
Items: []craftgate.PaymentItem{
{
Name: "Item 1",
Price: 0.6,
},
{
Name: "Item 2",
Price: 0.4,
},
},
}
res, err := paymentClient.Payment.InitApmPayment(context.Background(), request)
_, _ = spew.Printf("%#v\n", res)

if err != nil {
t.Errorf("Error %s", err)
}
}

func TestPayment_CompleteApmPayment(t *testing.T) {
request := adapter.CompleteApmPaymentRequest{
PaymentId: 123,
Expand Down

0 comments on commit 00ab2c5

Please sign in to comment.