mirror of
https://github.com/tavo-wasd-gh/conex-builder.git
synced 2025-07-12 10:23:28 -06:00
see paypal error
This commit is contained in:
parent
ef2d670df4
commit
775cdc2c0f
1 changed files with 5 additions and 0 deletions
|
@ -152,6 +152,11 @@ func CreateOrder() (string, error) {
|
||||||
}
|
}
|
||||||
defer raw.Body.Close()
|
defer raw.Body.Close()
|
||||||
|
|
||||||
|
if raw.StatusCode != http.StatusOK {
|
||||||
|
body, _ := io.ReadAll(raw.Body)
|
||||||
|
return "", fmt.Errorf("PayPal API error: %s", string(body))
|
||||||
|
}
|
||||||
|
|
||||||
var response struct {
|
var response struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue