From 78915bd6019c6616412e8b293714eeab36e887cf Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sat, 14 Oct 2017 15:41:31 +0200 Subject: [PATCH] Updated to latest Aero --- pages/paypal/paypal.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/paypal/paypal.go b/pages/paypal/paypal.go index e3afe009..2c5d188f 100644 --- a/pages/paypal/paypal.go +++ b/pages/paypal/paypal.go @@ -17,7 +17,11 @@ func CreatePayment(ctx *aero.Context) string { return ctx.Error(http.StatusUnauthorized, "Not logged in", nil) } - amount := string(ctx.RequestBody()) + amount, err := ctx.Request().Body().String() + + if err != nil { + return ctx.Error(http.StatusBadRequest, "Could not read amount", err) + } // Verify amount switch amount {