#aiaone

1 messages ยท Page 1 of 1 (latest)

tired vector
#

Hello! Just starting a thread for you -- I'll review and respond as soon as I can ๐Ÿ™‚

#

What can we help with?

#

@hallow owl please message here

hallow owl
#

ok

tired vector
#

does golib not support 3ds?
What do you mean exactly? What are you trying to do?

hallow owl
#

thanks

#

I trying to access 3ds VerificationData in golang lib.

#

but your lib looks like not Declare that fields

tired vector
#

The code you share in main:

type IssuingAuthorizationVerificationData struct {
    // Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`.
    AddressLine1Check IssuingAuthorizationVerificationDataCheck `json:"address_line1_check"`
    // Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`.
    AddressPostalCodeCheck IssuingAuthorizationVerificationDataCheck `json:"address_postal_code_check"`
    // Whether the cardholder provided a CVC and if it matched Stripe's record.
    CVCCheck IssuingAuthorizationVerificationDataCheck `json:"cvc_check"`
    // Whether the cardholder provided an expiry date and if it matched Stripe's record.
    ExpiryCheck IssuingAuthorizationVerificationDataCheck `json:"expiry_check"`
}
hallow owl
#

Yes

tired vector
hallow owl
#

How can I access that 3ds fields in golang?

#

this is php lib, works fine.

#

this is golang lib

#

@tired vector

tired vector
#

Yep, I'm looking, and what exactly is the issue here?

hallow owl
#

in golang lib unable access 3ds VerificationData so that i can't handle issuing cards transactions if that transaction trigger 3ds auth.

#

If the merchant supports 3ds then the issuing transaction is approved or rejected based on the 3ds result.

#

in golang lib, this is Impossible. Because you didn't parse the 3ds verification results.

tired vector
#

Ah, i see

#

Ok, looking into this to see what's going on, but in the mean time there's another way to get at the data assuming its actually in the response

#

Can you share an example event/request so I can confirm? Or if you've already looked at the raw data to validate its there, great!

hallow owl
#

OK, Please hold on, I tell you how fix it. ๐Ÿ™‚

#
type IssuingAuthorizationVerificationData struct {
    // Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`.
    AddressLine1Check IssuingAuthorizationVerificationDataCheck `json:"address_line1_check"`
    // Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`.
    AddressPostalCodeCheck IssuingAuthorizationVerificationDataCheck `json:"address_postal_code_check"`
    // Whether the cardholder provided a CVC and if it matched Stripe's record.
    CVCCheck IssuingAuthorizationVerificationDataCheck `json:"cvc_check"`
    // Whether the cardholder provided an expiry date and if it matched Stripe's record.
    ExpiryCheck IssuingAuthorizationVerificationDataCheck `json:"expiry_check"`
    // Add this to parse 3ds result from stripe rest API
    // Add the following code to fix this issue.
    ThreeDSecure IssuingAuthorizationVerificationThreeDSecure `json:"three_d_secure"`
}

// result is string
type IssuingAuthorizationVerificationThreeDSecureResult string

// parse result of 3ds VerificationData
type IssuingAuthorizationVerificationThreeDSecure struct {
    Result IssuingAuthorizationVerificationThreeDSecureResult `json:"result"`
}
tired vector
#

๐Ÿ˜„

hallow owl
#

added IssuingAuthorizationVerificationThreeDSecure

#

added IssuingAuthorizationVerificationThreeDSecure

#

added IssuingAuthorizationVerificationThreeDSecureResult

#

that's all

tired vector
#

Yep, that's what i was expecting to see

hallow owl
#

๐Ÿ™‚

tired vector
#

You're welcome to make a PR, but I think we'll likely push the fix out using internal tools to correct this missing piece

hallow owl
#

Yes,

#

May I ask have any time line to push code for fix this?

#

๐Ÿ˜„

hallow owl
#

add that 3ds fields in type IssuingAuthorizationVerificationData struct

#

๐Ÿ˜„

tired vector
#

While we get that sorted out, you should be able to access the data by parsing the raw json, similar to this:

s, _ := sub.Get("sub_123", nil)

var rawData map[string]interface{}
_ = json.Unmarshal(s.LastResponse.RawJSON, &rawData)
int64(rawData["created"].(float64))

transferData, ok := rawData["transfer_data"].(map[string]interface{})
if ok {
  transferData["amount_percent"].(float64))
}

hallow owl
#

Sure, I'll do this. but better way is you fix this. lol.

tired vector
#

Oh I completely agree

#

I just mean to get you unblocked right now

hallow owl
#

Sure, I'll parse that raw event in my codebase.

#

Issue created

tired vector