Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Verification of credit card on Braintree while making payment

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 575
    Comment on it

    While integrating a payment gateway with our site we seldom come to a case where user already entered credit card information is not able to get verified. Thus a particular amount is being lost by the site owner. There are various resaon for credit card verfication failure one of the most common being card getting expiered before the payment request was fired. To handle this particular case it is always advisable to check your credit card being used when a user fills the payment form. In case of Braintree we can achieve the same by making an update request for the user credit card with the minimal information with verified flag being set to true.

    result = Braintree::PaymentMethod.update("the_payment_method_token",
      :options => {
        :verify_card => true
      }
    )
    begin
    result = Braintree::PaymentMethod.update("bjzc82",:options => {:verify_card => true})
    if result.success?
     p "Congraulations! Your transaction has been successfully!"
    else
     p "Something went wrong while processing your transaction. Please try again!"
    end
    rescue
     p "Something went wrong while processing your transaction"
    end

    ** Note that an update will create a transaction, so if your processing options are set to reject transactions without CVV, you will need to include CVV as a parameter, or disable this rule in the control panel.

    1) Log into the Control Panel

    2) Navigate to Settings > Processing > CVV

    3) Click Edit and uncheck CVV Not Provided (I)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: