Skip to content

Commit

Permalink
Merge pull request #3 from MjukBiltvatt/bugfix/charge-error-response
Browse files Browse the repository at this point in the history
removed resp.transaction response from charge on error
  • Loading branch information
ceeerik authored Sep 6, 2022
2 parents f544336 + 3247fcf commit 618ce24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (c *Client) Recur(order RecurOrder) (Transaction, error) {
//Make the post request to the api
var resp paymentResponse
if err := c.post("recur", order, &resp); err != nil {
return resp.Transaction, err
return Transaction{}, err
}

return resp.Transaction, nil
Expand Down

0 comments on commit 618ce24

Please sign in to comment.