Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/bun/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint:fix": "biome check --write"
},
"dependencies": {
"@sumup/sdk": "^0.0.11"
"@sumup/sdk": "^0.1.6"
},
"devDependencies": {
"@biomejs/biome": "^2.1.2"
Expand Down
2 changes: 1 addition & 1 deletion backend/deno/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
},
"imports": {
"@std/assert": "jsr:@std/assert@1",
"@sumup/sdk": "jsr:@sumup/sdk@^0.0.11"
"@sumup/sdk": "jsr:@sumup/sdk@^0.1.6"
}
}
8 changes: 4 additions & 4 deletions backend/deno/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/dotnet/SumUpExamples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SumUp" Version="0.0.10" />
<PackageReference Include="SumUp" Version="0.0.15" />
</ItemGroup>
</Project>
8 changes: 3 additions & 5 deletions backend/go/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
module sumup-examples-go

go 1.23.0

toolchain go1.23.2
go 1.24.0

require (
github.com/google/uuid v1.6.0
github.com/sumup/sumup-go v0.13.0
github.com/sumup/sumup-go v0.17.0
)

require golang.org/x/oauth2 v0.27.0 // indirect
require golang.org/x/oauth2 v0.35.0 // indirect
4 changes: 4 additions & 0 deletions backend/go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/sumup/sumup-go v0.13.0 h1:35Xpv8cNLS5O02voKgwgks8Gz2QU53Ek8emlOyVuvkU=
github.com/sumup/sumup-go v0.13.0/go.mod h1:UgT9aaxvUBrAiRpunqyb1zi5v/+1z+6Lr6p6bgL8EYI=
github.com/sumup/sumup-go v0.17.0 h1:dNMEfzskJl9dHVFhEChAQBYsKc9FZWg2opeTlDUtfPI=
github.com/sumup/sumup-go v0.17.0/go.mod h1:D++G2u9zvobimuUrgvSbah/tS3ON2Dmi6yb6ScA2Jpg=
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/oauth2 v0.35.0 h1:Mv2mzuHuZuY2+bkyWXIHMfhNdJAdwW3FuWeCPYN5GVQ=
golang.org/x/oauth2 v0.35.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
9 changes: 3 additions & 6 deletions backend/go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import (

"github.com/google/uuid"
"github.com/sumup/sumup-go"
sumupclient "github.com/sumup/sumup-go/client"
"github.com/sumup/sumup-go/checkouts"
"github.com/sumup/sumup-go/shared"
)

type createCheckoutRequest struct {
Expand All @@ -27,7 +24,7 @@ func main() {
log.Fatal("Missing SUMUP_MERCHANT_CODE env var.")
}

client := sumup.NewClient(sumupclient.WithAPIKey(apiKey))
client := sumup.NewClient()

http.HandleFunc("/checkouts", func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
Expand All @@ -46,9 +43,9 @@ func main() {
return
}

checkout, err := client.Checkouts.Create(r.Context(), checkouts.Create{
checkout, err := client.Checkouts.Create(r.Context(), sumup.CheckoutCreateRequest{
Amount: payload.Amount,
Currency: shared.CurrencyEUR,
Currency: sumup.CurrencyEUR,
MerchantCode: merchantCode,
CheckoutReference: "checkout-" + uuid.NewString(),
})
Expand Down
8 changes: 4 additions & 4 deletions backend/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint:fix": "biome check --write"
},
"dependencies": {
"@sumup/sdk": "^0.1.3",
"@sumup/sdk": "^0.1.6",
"express": "^5.2.1"
},
"devDependencies": {
Expand Down
11 changes: 4 additions & 7 deletions backend/python/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from flask import Flask, jsonify, request
from sumup import Sumup
from sumup.checkouts import CreateCheckoutBody

api_key = os.environ.get("SUMUP_API_KEY")
merchant_code = os.environ.get("SUMUP_MERCHANT_CODE")
Expand Down Expand Up @@ -31,12 +30,10 @@ def create_checkout():
return jsonify({"error": "amount must be a positive number"}), 400

checkout = client.checkouts.create(
body=CreateCheckoutBody(
amount=amount,
currency="EUR",
checkout_reference=f"checkout-{uuid.uuid4()}",
merchant_code=merchant_code,
)
amount=amount,
currency="EUR",
checkout_reference=f"checkout-{uuid.uuid4()}",
merchant_code=merchant_code,
)

if hasattr(checkout, "model_dump"):
Expand Down
2 changes: 1 addition & 1 deletion backend/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "SumUp Python example"
requires-python = ">=3.10"
dependencies = [
"flask",
"sumup",
"sumup==0.2.2",
]

[tool.uv]
8 changes: 4 additions & 4 deletions backend/python/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading