public function getFormFields(Order $order)
{
$fields = FieldList::create();
$gateways = GatewayInfo::getSupportedGateways();
if (count($gateways) > 1) {
$fields->push(OptionsetField::create('PaymentMethod', _t("CheckoutField.PaymentType", "Payment Type"), $gateways, array_keys($gateways)));
}
if (count($gateways) == 1) {
$fields->push(HiddenField::create('PaymentMethod')->setValue(key($gateways)));
}
return $fields;
}