public function doPayment(&$params, $component = 'contribute') {
$propertyBag = \Civi\Payment\PropertyBag::cast($params);
$this->_component = $component;
public function doPayment(&$params, $component = 'contribute') {
$propertyBag = \Civi\Payment\PropertyBag::cast($params);
$this->_component = $component;
// If we have a $0 amount, skip call to processor and set payment_status to Completed.
// Conceivably a processor might override this - perhaps for setting up a token - but we don't
// have an example of that at the moment.
if ($propertyBag->getAmount() == 0) {
// If we have a $0 amount, skip call to processor and set payment_status to Completed.
// Conceivably a processor might override this - perhaps for setting up a token - but we don't
// have an example of that at the moment.
if ($propertyBag->getAmount() == 0) {
$trxn_id = (string) CRM_Core_DAO::singleValueQuery($query);
$trxn_id = (int) str_replace('test', '', $trxn_id);
++$trxn_id;
$trxn_id = (string) CRM_Core_DAO::singleValueQuery($query);
$trxn_id = (int) str_replace('test', '', $trxn_id);
++$trxn_id;