<?php

abstract class Type_PagarmeBandeira extends EnumBasic{
  const Tp_Mastercard  = 0 ;
  const Tp_Visa        = 1 ;
  const Tp_Amex        = 2 ;
  const Tp_Elo         = 3 ;
  const Tp_Hipercard   = 4 ;
  const Tp_Jcb         = 5 ;
  const Tp_Aura        = 6 ;
  const Tp_Diners      = 7 ;


  protected static $nickname = array(
    self::Tp_Mastercard => 'mastercard',
    self::Tp_Visa       => 'visa',
    self::Tp_Amex       => 'amex',
    self::Tp_Elo        => 'elo',
    self::Tp_Hipercard  => 'hipercard',
    self::Tp_Jcb        => 'jcb',
    self::Tp_Aura       => 'aura',
    self::Tp_Diners     => 'diners',

  );
}

abstract class Type_pagarmeConfigs extends EnumBasic
{
  const Tp_NameModule    = 'pagarme';
  const Tp_MaximoParcela = '12';

  protected static $nickname = array(
    self::Tp_NameModule => 'Usado para identificar qual o metodo de pagamento que foi escolhido',
    self::Tp_MaximoParcela => 'Quantidade maxima de parcelas que o pedido pode ser dividido',
  );
}

abstract class Type_PagarmePagamentoStatus extends EnumBasic{
  const Tp_Pendente             = 'waiting_payment';
  const Tp_generated            = 'generated';
  const Tp_viewed               = 'viewed';
  const Tp_underpaid            = 'underpaid';
  const Tp_overpaid             = 'overpaid';
  const Tp_Pago                 = 'paid';
  const Tp_Cancelado            = 'voided';
  const Tp_with_error           = 'with_error';
  const Tp_failed               = 'failed';
  const Tp_processing           = 'processing';
  //pix
  const Tp_refunded             = 'refunded';
  const Tp_pending_refuded      = 'pending_refuded';

  const Tp_pending_capture      = 'authorized_pending_capture';
  const Tp_Reprovado            = 'not_authorized';
  const Tp_partial_capture      = 'partial_capture';
  const Tp_waiting_capture      = 'waiting_capture';
  const Tp_waiting_cancellation = 'waiting_cancellation';
  const Tp_error_on_refunding   = 'error_on_refunding';
  const Tp_error_on_voiding     = 'error_on_voiding';
  const Tp_partial_void         = 'partial_void';
  const Tp_partial_refunded     = 'partial_refunded';
  const Tp_captured             = 'captured';
  const Tp_canceled            = 'canceled';
  const Tp_chargedback          = 'chargedback';

  const Tp_Negado       = 'DENIED';
  const Tp_Erro         = 'ERROR';
  const Tp_Aprovado     = 'APPROVED';


  protected static $nickname = array(
    self::Tp_Pendente             => 'Aguardando Pagamento',
    self::Tp_generated            => 'Gerado',
    self::Tp_viewed               => 'Visualizado',
    self::Tp_underpaid            => 'Pago a menor',
    self::Tp_overpaid             => 'Pago a maior',
    self::Tp_Pago                 => 'Pago',
    self::Tp_Cancelado            => 'Cancelado',
    self::Tp_with_error           => 'Com erro',
    self::Tp_failed               => 'Falha',
    self::Tp_processing           => 'Boleto ainda está em etapa de criação',
    //pix
    self::Tp_refunded             => 'Estornado',
    self::Tp_pending_refuded      => 'Aguardando estorno',
    self::Tp_waiting_capture      => 'Aguardando captura',

    self::Tp_pending_capture      => 'Autorizada pendente de captura',
    self::Tp_Reprovado            => 'Reprovado',
    self::Tp_partial_capture      => 'Capturada parcialmente',
    self::Tp_waiting_cancellation => 'Aguardando cancelamento',
    self::Tp_error_on_refunding   => 'Erro no estorno',
    self::Tp_error_on_voiding     => 'Erro no cancelamento',
    self::Tp_partial_void         => 'Cancelada parcialmente',
    self::Tp_partial_refunded     => 'Estornada parcialmente',
    self::Tp_captured             => 'Capturada',
    self::Tp_chargedback          => 'Estorno',
    self::Tp_canceled             => 'Cancelado',


    self::Tp_Negado    => 'Negado',
    self::Tp_Erro      => 'Em erro',
    self::Tp_Aprovado  => 'Aprovado',

  );
}
abstract class Type_PagarmeInstallBank extends EnumBasic{
  const Tp_install     = '[{"key":"1","descricao":"elo","status":"","valor_minimo":"","total_parcela":"","parcela_juros":""},{"key":"2","descricao":"mastercard","status":"","valor_minimo":"","total_parcela":"","parcela_juros":""},{"key":"3","descricao":"visa","status":"","valor_minimo":"","total_parcela":"","parcela_juros":""},{"key":"","descricao":"amex","status":"","valor_minimo":"","total_parcela":"","parcela_juros":""},{"key":"","descricao":"jcb","status":"","valor_minimo":"","total_parcela":"","parcela_juros":""},{"key":"","descricao":"aura","status":"","valor_minimo":"","total_parcela":"","parcela_juros":""},{"key":"","descricao":"hipercard","status":"","valor_minimo":"","total_parcela":"","parcela_juros":""},{"key":"","descricao":"diners","status":"","valor_minimo":"","total_parcela":"","parcela_juros":""}]';

  protected static $nickname = array(
    self::Tp_install    => 'install',

  );
}


