BTThreeDSecureLookup.m 654 B

1234567891011121314151617181920212223242526
  1. #import "BTThreeDSecureLookup.h"
  2. @implementation BTThreeDSecureLookup
  3. - (instancetype)initWithJSON:(BTJSON *)json {
  4. self = [super init];
  5. if (self) {
  6. _PAReq = [json[@"pareq"] asString];
  7. _MD = [json[@"md"] asString];
  8. _acsURL = [json[@"acsUrl"] asURL];
  9. _termURL = [json[@"termUrl"] asURL];
  10. _threeDSecureVersion = [json[@"threeDSecureVersion"] asString];
  11. _transactionId = [json[@"transactionId"] asString];
  12. }
  13. return self;
  14. }
  15. - (BOOL)requiresUserAuthentication {
  16. return self.acsURL != nil;
  17. }
  18. - (BOOL)isThreeDSecureVersion2 {
  19. return [self.threeDSecureVersion hasPrefix:@"2."];
  20. }
  21. @end