congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
CreditCard.getProviderUniqueId
Code IndexAdd Tabnine to your IDE (free)

How to use
getProviderUniqueId
method
in
com.aoindustries.creditcards.CreditCard

Best Java code snippets using com.aoindustries.creditcards.CreditCard.getProviderUniqueId (Showing top 9 results out of 315)

origin: com.aoindustries/ao-credit-cards-sagePayments

@Override
public void deleteCreditCard(CreditCard creditCard) throws IOException {
  try {
    boolean success = new WsVaultLocator().getwsVaultSoap().DELETE_DATA(
      emptyStringIfNull(merchantId),
      emptyStringIfNull(merchantKey),
      emptyStringIfNull(creditCard.getProviderUniqueId())
    );
    if(!success) throw new LocalizedIOException(accessor, "MerchantServicesProvider.deleteCreditCard.notSuccessful");
  } catch(ServiceException err) {
    throw new IOException(err);
  } catch(RemoteException err) {
    throw new IOException(err);
  }
}
origin: com.aoindustries/ao-credit-cards-sagePayments

  emptyStringIfNull(merchantId),
  emptyStringIfNull(merchantKey),
  emptyStringIfNull(creditCard.getProviderUniqueId()),
  emptyStringIfNull(CreditCard.getExpirationDateMMYY(expirationMonth, expirationYear))
).get_any();
origin: com.aoindustries/ao-credit-cards-sagePayments

emptyStringIfNull(merchantId),
emptyStringIfNull(merchantKey),
emptyStringIfNull(creditCard.getProviderUniqueId()),
emptyStringIfNull(cardNumber),
emptyStringIfNull(CreditCard.getExpirationDateMMYY(expirationMonth, expirationYear))
origin: com.aoindustries/ao-credit-cards-stripe

  @Override
  public void deleteCreditCard(CreditCard creditCard) throws IOException {
    try {
      Customer customer = Customer.retrieve(creditCard.getProviderUniqueId(), options);
      if(customer.getDeleted() == null || !customer.getDeleted()) {
        DeletedCustomer deletedCustomer = customer.delete(options);
      }
    } catch(StripeException e) {
      ConvertedError converted = convertError(e);
      // TODO: Throw ErrorCodeException to provide more details
      throw new LocalizedIOException(e, accessor, "MerchantServicesProvider.deleteCreditCard.notSuccessful");
    }
  }
}
origin: com.aoindustries/ao-credit-cards-stripe

@Override
public void updateCreditCard(CreditCard creditCard) throws IOException {
  // Update the Customer
  Map<String,Object> updateCustomerParams = new HashMap<String,Object>();
  addCustomerParams(creditCard, true, updateCustomerParams);
  // Update the default Card
  Map<String,Object> updateCardParams = new HashMap<String,Object>();
  addCardParams(creditCard, true, updateCardParams);
  try {
    Customer customer = Customer.retrieve(creditCard.getProviderUniqueId(), options);
    customer.update(updateCustomerParams, options);
    CustomerCardCollection cards = customer.getCards();
    Card defaultCard = cards.retrieve(customer.getDefaultCard(), options);
    defaultCard.update(updateCardParams, options);
  } catch(StripeException e) {
    ConvertedError converted = convertError(e);
    // TODO: Throw ErrorCodeException to provide more details
    throw new LocalizedIOException(e, accessor, "MerchantServicesProvider.updateCreditCardNumberAndExpiration.notSuccessful");
  }
}
origin: com.aoindustries/ao-credit-cards-stripe

addParam(false, chargeParams, "amount", amount);
addParam(false, chargeParams, "currency", currency.getCurrencyCode());
if(creditCard.getProviderUniqueId() != null) {
  addParam(false, chargeParams, "customer", creditCard.getProviderUniqueId());
} else {
origin: com.aoindustries/ao-credit-cards-stripe

@Override
public void updateCreditCardNumberAndExpiration(
  CreditCard creditCard,
  String cardNumber,
  byte expirationMonth,
  short expirationYear,
  String cardCode
) throws IOException {
  // Replace the default Card
  Map<String,Object> cardParams = makeCardParams(
    creditCard,
    true,
    cardNumber,
    expirationMonth,
    expirationYear,
    cardCode!=null ? CreditCard.numbersOnly(cardCode) : creditCard.getCardCode()
  );
  Map<String,Object> updateParams = new HashMap<String,Object>();
  addParam(true, updateParams, "card", cardParams);
  try {
    Customer customer = Customer.retrieve(creditCard.getProviderUniqueId(), options);
    customer.update(updateParams, options);
  } catch(StripeException e) {
    ConvertedError converted = convertError(e);
    // TODO: Throw ErrorCodeException to provide more details
    throw new LocalizedIOException(e, accessor, "MerchantServicesProvider.updateCreditCardNumberAndExpiration.notSuccessful");
  }
}
origin: com.aoindustries/ao-credit-cards-stripe

@Override
public void updateCreditCardExpiration(
  CreditCard creditCard,
  byte expirationMonth,
  short expirationYear
) throws IOException {
  // Update the default Card
  Map<String,Object> updateParams = new HashMap<String,Object>();
  addParam(true, updateParams, "exp_month", expirationMonth);
  addParam(true, updateParams, "exp_year", expirationYear);
  try {
    Customer customer = Customer.retrieve(creditCard.getProviderUniqueId(), options);
    CustomerCardCollection cards = customer.getCards();
    Card defaultCard = cards.retrieve(customer.getDefaultCard(), options);
    defaultCard.update(updateParams, options);
  } catch(StripeException e) {
    ConvertedError converted = convertError(e);
    // TODO: Throw ErrorCodeException to provide more details
    throw new LocalizedIOException(e, accessor, "MerchantServicesProvider.updateCreditCardExpiration.notSuccessful");
  }
}
origin: com.aoindustries/ao-credit-cards-sagePayments

if(creditCard.getProviderUniqueId() != null) {
      emptyStringIfNull(creditCard.getCountryCode()),
      emptyStringIfNull(creditCard.getEmail()),
      emptyStringIfNull(creditCard.getProviderUniqueId()),
      emptyStringIfNull(null),
      emptyStringIfNull(creditCard.getCountryCode()),
      emptyStringIfNull(creditCard.getEmail()),
      emptyStringIfNull(creditCard.getProviderUniqueId()),
      emptyStringIfNull(null),
com.aoindustries.creditcardsCreditCardgetProviderUniqueId

Popular methods of CreditCard

  • getCardCode
  • getCardNumber
  • getCity
  • getCountryCode
  • getEmail
  • getFirstName
  • getLastName
  • getPhone
  • getPostalCode
  • getState
  • getStreetAddress1
  • getStreetAddress2
  • getStreetAddress1,
  • getStreetAddress2,
  • getComments,
  • getCompanyName,
  • getCustomerId,
  • getExpirationDateMMYY,
  • getFax,
  • getFullName,
  • numbersOnly,
  • getCustomerTaxId

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Path (java.nio.file)
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now