Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
authnet missing refund data (#212)
Browse files Browse the repository at this point in the history
* add phonenumber + email authnet

* fix tests

* add invoicenumber to authnet
  • Loading branch information
rlcooper46 committed Mar 2, 2022
1 parent ed61b6e commit 708af24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gateways/authorizenet/request_builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ func buildRefundRequest(merchantName string, transactionKey string, refundReques
ExpirationDate: expirationDateXXXX,
},
},
Order: &Order{
InvoiceNumber: common.SafeStr(refundRequest.MerchantOrderReference),
},
},
},
}
Expand Down
6 changes: 6 additions & 0 deletions gateways/authorizenet/request_builders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ func TestBuildRefundRequest(t *testing.T) {
t.Run("With Valid Requests", func(t *testing.T) {
base := sleet_testing.BaseRefundRequest()

MerchantOrderReference := "543321"

base.MerchantOrderReference = &MerchantOrderReference
amount := "1.00"

cases := []struct {
Expand All @@ -326,6 +329,9 @@ func TestBuildRefundRequest(t *testing.T) {
ExpirationDate: expirationDateXXXX,
},
},
Order: &Order{
InvoiceNumber: MerchantOrderReference,
},
},
},
},
Expand Down

0 comments on commit 708af24

Please sign in to comment.