Braintree.CreditCardGateway.FromNonce C# (CSharp) Method

FromNonce() public method

public FromNonce ( string nonce ) : CreditCard
nonce string
return CreditCard
        public virtual CreditCard FromNonce(string nonce)
        {
            if(nonce == null || nonce.Trim().Equals(""))
                throw new NotFoundException();

            try {
                XmlNode creditCardXML = service.Get(service.MerchantPath() + "/payment_methods/from_nonce/" + nonce);
                return new CreditCard(new NodeWrapper(creditCardXML), gateway);
            } catch (NotFoundException) {
                throw new NotFoundException("Payment method with nonce " + nonce + " locked, consumed or not found");
            }
        }