contract PaymentFallbackReceiver {
  BTCPaymentI public payment;

  enum SaleType { pre, main }

  function PaymentFallbackReceiver(address _payment) public {
    require(_payment != address(0));
    payment = BTCPaymentI(_payment);
  }

  modifier onlyPayment() {
    require(msg.sender == address(payment));
    _;
  }

  event MintByBTC(SaleType _saleType, address indexed _beneficiary, uint256 _tokens);

  /**
   * @dev paymentFallBack() is called in BTCPayment.addPayment().
   * Presale or Mainsale contract should mint token to beneficiary,
   * and apply corresponding ether amount to max ether cap.
   * @param _beneficiary ethereum address who receives tokens
   * @param _tokens amount of FXT to mint
   */
  function paymentFallBack(address _beneficiary, uint256 _tokens) external onlyPayment();
}
function paymentFallBack(address _beneficiary, uint256 _tokens) external onlyPayment();

/**
 * @dev paymentFallBack() is called in BTCPayment.addPayment().
 * Presale or Mainsale contract should mint token to beneficiary,
 * and apply corresponding ether amount to max ether cap.
 * @param _beneficiary ethereum address who receives tokens
 * @param _tokens amount of FXT to mint
 */