Reply
Highlighted
New Member
Posts: 4
Registered: ‎03-02-2020
Accepted Solution

Validate a specific type of card in VBA

I've got some VBA code running in the sandbox and it works when I pass in a valid card # (based on the text guide).  But I cannot find any code samples which include the card type  so that if I enter:

 

Visa: 4111111111111111

it approves the transaction but if I enter

 

Mastercard: 4111111111111111

it declines the transaction.

 

What is the proper syntax in the below to pass the card type and have the sandbox validate for the cardtype and number?

 

If frm.chk_CardType Then
    post_string = post_string & "cardType=" & URLEncode(frm.cbo_CardType) & "&"
End If
post_string = post_string & "x_card_num=" & URLEncode(frm.txtCCNum) & "&"

 

The above code does not work, as "cardType" does not appear to be a valid parameter, and it returns "This transaction has been approved" regardless of the value of cbo_CardType

 

Thanks for your help

 


Accepted Solutions
Highlighted
Solution
Accepted by topic author dalefye1
‎03-11-2020 04:06 AM
Moderator
Posts: 591
Registered: ‎08-21-2009

Re: Validate a specific type of card in VBA

Hello,

 

We always derive the card type from the card number, so we do not have an input parameter for card type. If for some reason you would like to validate that a customer has matched the card number to a particular card type, this would have to be done outside of our system.

 

Thanks,

Trevor

View solution in original post


All Replies
Highlighted
Solution
Accepted by topic author dalefye1
‎03-11-2020 04:06 AM
Moderator
Posts: 591
Registered: ‎08-21-2009

Re: Validate a specific type of card in VBA

Hello,

 

We always derive the card type from the card number, so we do not have an input parameter for card type. If for some reason you would like to validate that a customer has matched the card number to a particular card type, this would have to be done outside of our system.

 

Thanks,

Trevor