Back to PhocacartPayment class

Method checkAndGetPaymentMethod

public bool|array
checkAndGetPaymentMethod
(mixed $id = 0, mixed $total = array(), mixed $shippingId = 0)
Check current payment method Payment method must be selected
Parameters
  • \number $id
Returns
  • bool|array

Method checkAndGetPaymentMethod - Source code

/*	public function checkAndGetPaymentMethodInsideCart($id, $total, $shippingId) {

		if ((int)$id > 0 && !empty($total)) {
			return $this->checkAndGetPaymentMethods($id, 0, $total, $shippingId);
		}
		return false;

	}*/
/**
 * Check current payment method
 * Payment method must be selected
 * @param number $id
 * @return boolean|array
 */
public function checkAndGetPaymentMethod($id = 0, $total = array(), $shippingId = 0)
{
    if ($id > 0) {
        return $this->checkAndGetPaymentMethods($id, 0, $total, $shippingId);
    }
    return false;
}