*/ public $cost; /** * Check if the instance matches a payment method * * @param Payment_Method_Data $data */ public function match( $data ): bool { return $data instanceof Payment_Method_Data && $this->product === $data->product && $this->campaign === $data->campaign; } /** * Check if the payment method should show more info */ public function should_show_more_info(): bool { return ! in_array( $this->product, array( 'fp1' ), true ); } /** * Check if the payment method should show cost description */ public function should_show_cost_description(): bool { return $this->cost_description && strtolower( $this->cost_description ) !== strtolower( $this->claim ); } /** * Encode the parent DTO instance into a raw string. Returns a base64 encoded JSON string. */ public function encode_data(): string { return parent::encode(); } }