Skip to content

Commit

Permalink
feat: Add skip_gateway_rules and eci (#14)
Browse files Browse the repository at this point in the history
Co-authored-by: ProcessOut Fountain <[email protected]>
  • Loading branch information
roshan-gorasia-cko and processout-machine authored Jan 25, 2024
1 parent d65da9a commit d54dd56
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions invoice_risk.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ type InvoiceRisk struct {
Score *string `json:"score,omitempty"`
// IsLegit is the define whether or not the invoice is legit
IsLegit *bool `json:"is_legit,omitempty"`
// SkipGatewayRules is the skip payment gateway fraud engine rules (on compatible gateways only.)
SkipGatewayRules *bool `json:"skip_gateway_rules,omitempty"`

client *ProcessOut
}
Expand All @@ -41,6 +43,7 @@ func (s *InvoiceRisk) Prefill(c *InvoiceRisk) *InvoiceRisk {

s.Score = c.Score
s.IsLegit = c.IsLegit
s.SkipGatewayRules = c.SkipGatewayRules

return s
}
Expand Down
2 changes: 1 addition & 1 deletion processout.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func New(projectID, projectSecret string) *ProcessOut {
func setupRequest(client *ProcessOut, opt *Options, req *http.Request) {
req.Header.Set("Content-Type", "application/json")
req.Header.Set("API-Version", client.APIVersion)
req.Header.Set("User-Agent", "ProcessOut Go-Bindings/v4.33.0")
req.Header.Set("User-Agent", "ProcessOut Go-Bindings/v4.34.0")
req.Header.Set("Accept", "application/json")
if client.UserAgent != "" {
req.Header.Set("User-Agent", client.UserAgent)
Expand Down
3 changes: 3 additions & 0 deletions transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ type Transaction struct {
SchemeID *string `json:"scheme_id,omitempty"`
// PaymentType is the payment type of the transaction
PaymentType *string `json:"payment_type,omitempty"`
// Eci is the the Electronic Commerce Indicator
Eci *string `json:"eci,omitempty"`
// NativeApm is the native APM response data
NativeApm *NativeAPMResponse `json:"native_apm,omitempty"`
// ExternalDetails is the additional data about the transaction, originating from a PSP, for example customer shipping address
Expand Down Expand Up @@ -261,6 +263,7 @@ func (s *Transaction) Prefill(c *Transaction) *Transaction {
s.InitialSchemeTransactionID = c.InitialSchemeTransactionID
s.SchemeID = c.SchemeID
s.PaymentType = c.PaymentType
s.Eci = c.Eci
s.NativeApm = c.NativeApm
s.ExternalDetails = c.ExternalDetails

Expand Down

0 comments on commit d54dd56

Please sign in to comment.