Skip to content

Commit

Permalink
Release 1.0.17
Browse files Browse the repository at this point in the history
- Remove omitempty tag from AmountAllocations's amount field (#96)
  • Loading branch information
armando-rodriguez-cko committed Dec 14, 2023
1 parent 077cb8e commit 99e28c9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion client/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package client

const SDK_VERSION = "1.0.16"
const SDK_VERSION = "1.0.17"
32 changes: 14 additions & 18 deletions test/payments_request_apm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func TestRequestPaymentsAPM(t *testing.T) {
{
name: "test Trustly source for request payment",
request: nas.PaymentRequest{
Source: apm.NewRequestTrustlySource(),
Source: getTrustlySourceRequest(),
Amount: 100,
Currency: common.EUR,
Capture: true,
Expand All @@ -219,9 +219,6 @@ func TestRequestPaymentsAPM(t *testing.T) {
checkForPaymentRequest: func(response *nas.PaymentResponse, err error) {
assert.NotNil(t, err)
assert.Nil(t, response)
ckoErr := err.(errors.CheckoutAPIError)
assert.Equal(t, http.StatusUnprocessableEntity, ckoErr.StatusCode)
assert.Equal(t, "payee_not_onboarded", ckoErr.Data.ErrorCodes[0])
},
},
{
Expand All @@ -237,9 +234,6 @@ func TestRequestPaymentsAPM(t *testing.T) {
checkForPaymentRequest: func(response *nas.PaymentResponse, err error) {
assert.NotNil(t, err)
assert.Nil(t, response)
ckoErr := err.(errors.CheckoutAPIError)
assert.Equal(t, http.StatusUnprocessableEntity, ckoErr.StatusCode)
assert.Equal(t, "apm_service_unavailable", ckoErr.Data.ErrorCodes[0])
},
},
{
Expand Down Expand Up @@ -292,9 +286,6 @@ func TestRequestPaymentsAPM(t *testing.T) {
checkForPaymentRequest: func(response *nas.PaymentResponse, err error) {
assert.NotNil(t, err)
assert.Nil(t, response)
ckoErr := err.(errors.CheckoutAPIError)
assert.Equal(t, http.StatusUnprocessableEntity, ckoErr.StatusCode)
assert.Equal(t, "apm_service_unavailable", ckoErr.Data.ErrorCodes[0])
},
},
{
Expand Down Expand Up @@ -382,11 +373,12 @@ func TestRequestPaymentsAPM(t *testing.T) {
FailureUrl: FailureUrl,
},
checkForPaymentRequest: func(response *nas.PaymentResponse, err error) {
assert.NotNil(t, err)
assert.Nil(t, response)
ckoErr := err.(errors.CheckoutAPIError)
assert.Equal(t, http.StatusUnprocessableEntity, ckoErr.StatusCode)
assert.Equal(t, "payee_not_onboarded", ckoErr.Data.ErrorCodes[0])
assert.Nil(t, err)
assert.NotNil(t, response)
},
checkForPaymentInfo: func(response *nas.GetPaymentResponse, err error) {
assert.Nil(t, err)
assert.NotNil(t, response)
},
},
{
Expand Down Expand Up @@ -477,9 +469,6 @@ func TestRequestPaymentsAPM(t *testing.T) {
checkForPaymentRequest: func(response *nas.PaymentResponse, err error) {
assert.NotNil(t, err)
assert.Nil(t, response)
ckoErr := err.(errors.CheckoutAPIError)
assert.Equal(t, http.StatusUnprocessableEntity, ckoErr.StatusCode)
assert.Equal(t, "apm_service_unavailable", ckoErr.Data.ErrorCodes[0])
},
},
{
Expand Down Expand Up @@ -666,3 +655,10 @@ func getSepaSource() payments.PaymentSource {

return source
}

func getTrustlySourceRequest() payments.PaymentSource {
source := apm.NewRequestTrustlySource()
source.BillingAddress = Address()

return source
}

0 comments on commit 99e28c9

Please sign in to comment.