From 65c405bba405a74359c8f82c1e8cacd87e3d5270 Mon Sep 17 00:00:00 2001 From: Tomas Roos Date: Mon, 12 Nov 2018 08:40:43 +0100 Subject: [PATCH 1/3] Added latest certs from getswish.se --- certs/root.pem | 48 +++++++++++++++++++++--------------------------- certs/test.p12 | Bin 7574 -> 7157 bytes 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/certs/root.pem b/certs/root.pem index d3bee21..342ecfe 100644 --- a/certs/root.pem +++ b/certs/root.pem @@ -1,28 +1,22 @@ -----BEGIN CERTIFICATE----- -MIIFrjCCA5agAwIBAgIIHclBF0nNX3UwDQYJKoZIhvcNAQENBQAwWzEUMBIGA1UECgwLR2V0c3dp -c2ggQUIxHjAcBgNVBAsMFVN3aXNoIE1lbWJlciBCYW5rcyBDQTEjMCEGA1UEAwwaVGVzdCBTd2lz -aCBSb290IENBIHYxIFRlc3QwHhcNMTUwNTI1MTM1NDU5WhcNMzUxMjMxMTM1NDU5WjBbMRQwEgYD -VQQKDAtHZXRzd2lzaCBBQjEeMBwGA1UECwwVU3dpc2ggTWVtYmVyIEJhbmtzIENBMSMwIQYDVQQD -DBpUZXN0IFN3aXNoIFJvb3QgQ0EgdjEgVGVzdDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC -ggIBALlHSAjTaFkVCfZnxIJJwtl7CP+9eKGHhmXx75/sKKThCTtJxZOxZtKCsOonQ24d3x2Tfylg -1ojMyAT1bFcEC5OuCge2IuMGVgtQz9bZZHL72uOfCbRZoOHWkeZsv6OdQQ9AspKX/Dr5J0nybqFC -xg6EtfCvUP9eY/ViAs/RuIvylGfPwqresEq+SZmJQWqAuO6h+lIFv3WuLkllZxk58AKzVgzGI93+ -tkpQUHHOD1M6t5xBUtObKRx0q4x0EX5DofuTdhFww6HQqQRWAMI7ikL65XkR9Ce29FidJBqTGVem -eVqaLjwB6CIZTj0b4VhSJCgOnEfS0qVygNklKb2YBU7O/krbg4S9A/26MWcArWJeOtyOWS9CGxVc -X/w+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DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr +hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg +06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF +PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls +YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk +CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= +-----END CERTIFICATE----- diff --git a/certs/test.p12 b/certs/test.p12 index a70d320bc301cdff2f15713f4fcb465f78421008..65c36500fe393f40462d9aada08b7071385e2d65 100644 GIT binary patch literal 7157 zcmY+IRZtv&vTd=!Ngy~35v{@(JZ0UWTu<0-vWPb;UnynVJ;>%AXv(fe$1Kv+o2aAk2`NKxFTMT9+J2nlLvd5#iibcu&AxP20<#Iefl~ zH$b?|HBlc&=jg4mSo-icP{sVV?!}2F8=}e>T?XxpYc3$5!^FKI>||r``+k93@u5q< zt2qxXU1Wl(Lq+lgs&M--qh4q(N#c9z9knfy`OR70ZEfb!F}C^Qd|&(nB+RM67VHTN zBw>b#s1Zk1|y7SyF~cz7dJ-fSo5l?yG3y!O7bc9Ye%1P zG! z-e17g)}FtJqVTDG%iG8|mX7WnM@+u)QPVM7Z@)Nh@9ta{-Hx5;x%eLaq`t>xmSYaoFv{}G?p1s|y$WH%?6L?n|1OPuKi zW4#Lbc8tMbb9cx*6ooK=xoXe$HmXiAAZ9A_$*biOqYvFevaI`H{KXr0%syNZ_g7)9 z?$;j__=raO05&8aCUSgT#vx;$^~vq>*+VMK+Y-50nj?*sHkln=;i|k-(w_OM$m932 z`TKG5wL>%d9AKKaZLd|{J74LfUu`zHWI7v$TG}5krohixA~SBzgc04O7+R}l7Z%4X zh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>iT-{j5Zn z8HY^x$})eh-w!(|TpRy;v$oToDABz6JHl#bl;imRmLlp>m5`@d6qUB3pY_Wid#!I6 z2}GOD5{W9at)p@Q9cgcj{{WLU^l_zZ)cjVTSnZqdMcflbP-~2Y7t)8`03eG+q{{*G ztBbiB4>TmNUqkWF6{R!mJq)aIvmO(t;BheiCZ9VJ!4h6ZrU;>WBR^l#pkid9T_ag; zqRe1+@GK|!Sk)sptq#JVkK@7<1?h+vZuoh=A#*v8Kd8aIBwr^VPE3N6TCxGooau+o zZ`qeu^-`_s(Q9O?#tG>^@l57r4LpQ@N-c?`ZH}Y&9s54pD`O#jn^8@XlF{Y|R)nsN z5l05uQXnzsp$ae@HLeByv0ic9q^?=_OS`V7_$0%Syu-1%xOj*zCi_+^?1?qX;=cqk z#}@brNn$*+z*`dSsxGR{=F|z$4Y%ts#UMIR8IJmQ)GPf8NMw|m<0q+DO@Exn8ClTm zvlDR`&u-O!P{8mJblZ|?aV}5B+$mbX(mOoquqUqB;m<$uu#{}(^>ZPgD{1%Qp64UV z>{n*1iR4-rA;p8iLOX1C`}EM=!6sTjw(0n+e^7{YmpdT{tI?4Clk`Tx)U1Nne?OMJ zEd1#+9H+$JCe{#YRPXz|z5U4JiSK(4D$)R$8Y6>=p)F(LQFP56l2-G>6H2mQ<+m9> zA5(CwRdwjyn-G=e>e{h!mpx{gDG_&~^MsmH%qABcVWj9+QR8d=pdcWM)_^~NDZz*c z@E{C0SP~$f%pZ@TY_(|dWZsldO(74GFv@xpKs?Q)-*t)7yaty5$GVb`v?_#u+!6oz GK>vR!YC^^U From 426a5741e626ddc0b4bc071d25550a07ccd73a15 Mon Sep 17 00:00:00 2001 From: Tomas Roos Date: Mon, 12 Nov 2018 08:41:20 +0100 Subject: [PATCH 2/3] amount is now a number being returned from the swish api This causes the json deserialisation to fail Hence updating the struct to represent this as a float64 instead causes us To need to update the tests as well --- endpoints.go | 34 +++++++++++++++++----------------- endpoints_test.go | 24 ++++++++++++------------ example/main.go | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/endpoints.go b/endpoints.go index bd97609..66a9f61 100644 --- a/endpoints.go +++ b/endpoints.go @@ -17,23 +17,23 @@ var ( // PaymentRequest represents a payment request from Swish API. type PaymentRequest struct { - AdditionalInformation string `json:"additionalInformation,omitempty"` - Amount string `json:"amount,omitempty"` - CallbackURL string `json:"callbackUrl,omitempty"` - Currency string `json:"currency,omitempty"` - DateCreated string `json:"dateCreated,omitempty"` - DatePaid string `json:"datePaid,omitempty"` - ErrorCode string `json:"errorCode,omitempty"` - ErrorMessage string `json:"errorMessage,omitempty"` - ID string `json:"id,omitempty"` - Message string `json:"message,omitempty"` - PayeeAlias string `json:"payeeAlias,omitempty"` - PayeePaymentReference string `json:"payeePaymentReference,omitempty"` - PayerPaymentReference string `json:"payerPaymentReference,omitempty"` - PayerAlias string `json:"payerAlias,omitempty"` - PaymentReference string `json:"paymentReference,omitempty"` - OriginalPaymentReference string `json:"originalPaymentReference,omitempty"` - Status string `json:"status,omitempty"` + AdditionalInformation string `json:"additionalInformation,omitempty"` + Amount float64 `json:"amount,omitempty"` + CallbackURL string `json:"callbackUrl,omitempty"` + Currency string `json:"currency,omitempty"` + DateCreated string `json:"dateCreated,omitempty"` + DatePaid string `json:"datePaid,omitempty"` + ErrorCode string `json:"errorCode,omitempty"` + ErrorMessage string `json:"errorMessage,omitempty"` + ID string `json:"id,omitempty"` + Message string `json:"message,omitempty"` + PayeeAlias string `json:"payeeAlias,omitempty"` + PayeePaymentReference string `json:"payeePaymentReference,omitempty"` + PayerPaymentReference string `json:"payerPaymentReference,omitempty"` + PayerAlias string `json:"payerAlias,omitempty"` + PaymentReference string `json:"paymentReference,omitempty"` + OriginalPaymentReference string `json:"originalPaymentReference,omitempty"` + Status string `json:"status,omitempty"` } // CreatePaymentRequest will create a payment request to Swish and return a payment diff --git a/endpoints_test.go b/endpoints_test.go index a44b64c..e016c59 100644 --- a/endpoints_test.go +++ b/endpoints_test.go @@ -33,12 +33,12 @@ func TestCreatePaymentRequest(t *testing.T) { return resp, nil }, expectedResult: &PaymentRequest{ - ID: "AB23D7406ECE4542A80152D909EF9F6B", + ID: "AB23D7406ECE4542A80152D909EF9F6B", PayeePaymentReference: "0123456789", CallbackURL: "https://example.com/api/swishcb/paymentrequests", PayerAlias: "46701234567", PayeeAlias: "1234760039", - Amount: "100", + Amount: 100, Currency: "SEK", Message: "Kingston USB Flash Drive 8 GB", }, @@ -83,7 +83,7 @@ func TestCreatePaymentRequest(t *testing.T) { CallbackURL: "https://example.com/api/swishcb/paymentrequests", PayerAlias: "46701234567", PayeeAlias: "1234760039", - Amount: "100", + Amount: 100, Currency: "SEK", Message: "Kingston USB Flash Drive 8 GB", }) @@ -117,7 +117,7 @@ func TestPaymentRequest(t *testing.T) { "callbackUrl": "https://example.com/api/swishcb/paymentrequests", "payerAlias": "46701234567", "payeeAlias": "1234760039", - "amount": "100", + "amount": 100, "currency": "SEK", "message": "Kingston USB Flash Drive 8 GB", "status": "PAID", @@ -127,13 +127,13 @@ func TestPaymentRequest(t *testing.T) { `), nil }, expectedResult: &PaymentRequest{ - ID: "AB23D7406ECE4542A80152D909EF9F6B", + ID: "AB23D7406ECE4542A80152D909EF9F6B", PayeePaymentReference: "0123456789", PaymentReference: "6D6CD7406ECE4542A80152D909EF9F6B", CallbackURL: "https://example.com/api/swishcb/paymentrequests", PayerAlias: "46701234567", PayeeAlias: "1234760039", - Amount: "100", + Amount: 100, Currency: "SEK", Message: "Kingston USB Flash Drive 8 GB", Status: "PAID", @@ -194,12 +194,12 @@ func TestCreateRefundRequest(t *testing.T) { return resp, nil }, expectedResult: &PaymentRequest{ - ID: "AB23D7406ECE4542A80152D909EF9F6B", + ID: "AB23D7406ECE4542A80152D909EF9F6B", OriginalPaymentReference: "AB23D7406ECE4542A80152D909EF9F6B", PayerPaymentReference: "0123456789", CallbackURL: "https://example.com/api/swishcb/paymentrequests", PayerAlias: "46701234567", - Amount: "100", + Amount: 100, Currency: "SEK", Message: "Refund for Kingston USB Flash Drive 8 GB", }, @@ -253,7 +253,7 @@ func TestCreateRefundRequest(t *testing.T) { PayerPaymentReference: "0123456789", CallbackURL: "https://example.com/api/swishcb/paymentrequests", PayerAlias: "46701234567", - Amount: "100", + Amount: 100, Currency: "SEK", Message: "Refund for Kingston USB Flash Drive 8 GB", }) @@ -287,7 +287,7 @@ func TestRefundRequest(t *testing.T) { "callbackUrl": "https://example.com/api/swishcb/refunds", "payerAlias": "46701234567", "payeeAlias": "1234760039", - "amount": "100", + "amount": 100, "currency": "SEK", "message": "Refund for Kingston USB Flash Drive 8 GB", "status": "PAID", @@ -297,13 +297,13 @@ func TestRefundRequest(t *testing.T) { `), nil }, expectedResult: &PaymentRequest{ - ID: "AB23D7406ECE4542A80152D909EF9F6B", + ID: "AB23D7406ECE4542A80152D909EF9F6B", PayeePaymentReference: "0123456789", PaymentReference: "6D6CD7406ECE4542A80152D909EF9F6B", CallbackURL: "https://example.com/api/swishcb/refunds", PayerAlias: "46701234567", PayeeAlias: "1234760039", - Amount: "100", + Amount: 100, Currency: "SEK", Message: "Refund for Kingston USB Flash Drive 8 GB", Status: "PAID", diff --git a/example/main.go b/example/main.go index bf52a5f..ded4e77 100644 --- a/example/main.go +++ b/example/main.go @@ -33,7 +33,7 @@ func create(w http.ResponseWriter, r *http.Request) { CallbackURL: "https://c06610e4.ngrok.io", PayeePaymentReference: "0123456789", PayeeAlias: "1231181189", - Amount: "100.00", + Amount: 100.00, Currency: "SEK", Message: "Kingston USB Flash Drive 8 GB", }) From 3d56eba4cd5da9c0a6740f8dc6f68f2327373293 Mon Sep 17 00:00:00 2001 From: Tomas Roos Date: Mon, 12 Nov 2018 09:55:59 +0100 Subject: [PATCH 3/3] update the callback url to make sure swish actually calls back to callback --- example/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/main.go b/example/main.go index ded4e77..b2ed54a 100644 --- a/example/main.go +++ b/example/main.go @@ -30,7 +30,7 @@ func init() { func create(w http.ResponseWriter, r *http.Request) { res, err := client.CreatePaymentRequest(context.Background(), &swish.PaymentRequest{ - CallbackURL: "https://c06610e4.ngrok.io", + CallbackURL: "https://c06610e4.ngrok.io/callback", PayeePaymentReference: "0123456789", PayeeAlias: "1231181189", Amount: 100.00,